[Gambas-user] A whole load of directories in my .local folder ??

Bruce Steers bsteers4 at gmail.com
Thu Feb 15 14:32:26 CET 2024


On Thu, 15 Feb 2024 at 13:14, Gianluigi <gradobag at gradobag.it> wrote:

> Il 15/02/24 13:28, Bruce Steers ha scritto:
>
>
>
> On Thu, 15 Feb 2024 at 12:23, Bruce Steers <bsteers4 at gmail.com> wrote:
>
>> I just opened my $HOME/.local folder to find all this..
>>
>> something to do with sqlite?
>>
>> anyone recognize the paths/files from something?
>> hsts-storage.sqlite ??
>>
>> there's 180 of these folders in my ~/.local/share dir
>>
>
> I just deleted them all and when i ran the IDE another one appeared.
>
> BruceS
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
> I confirm, every time I open the Gambas IDE in '.local/share' a new folder
> similar in name to this is added: 'org.gambas.149043'
>
> Regards
> Gianluigi
>

For now i added and option to my "clean temp folders" function in the IDE
to also do .local obsoletes as well as Temp() folders..

Private Sub CleanTempFolders(Optional bLocal As Boolean, Quiet As Boolean)

  Dim sDir As String = If(Not bLocal, File.Dir(File.Dir(Temp())), User.Home
&/ ".local/share")
  Dim sPattern As String = If(Not bLocal, "*", "org.gambas.*")
  Dim aObs As String[] = []

  For Each s As String In Dir(sDir, sPattern, gb.Directory).Sort(gb.Natural)
    If s Begins "org.gambas." Then s = File.Ext(s)
    If s Match "^[0-9]+$" Then
      If Not Exist("/proc" &/ s) Then aObs.Add(If(bLocal, "org.gambas." &
s, s))
    Endif
  Next
  If Not aObs.Count Then
    If Not Quiet Then Message("Found zero obsolete dirs")
  Else
    If Not quiet Then
     If Message.Question("Found " & aObs.Count & " obsolete dirs in...\n" &
sDir, "Remove", "Ignore") = 1 Then Shell "cd " & Shell(sDir) & "; rm -vrf "
& aObs.Join(" ") Wait
    Else
      Shell "cd " & Shell(sDir) & "; rm -vrf " & aObs.Join(" ") & "
>/dev/null" Wait
      Print "Killed "; aObs.Count; " obsolete dir(s) in "; sDir
    Endif
  Endif

End

It kills any obsolete folders in "/tmp/gambas.1000" and now in User.Home &/
".local/share" by checking if the process id is still alive in /proc/ or
not.
(I have menus to launch manually or i can set an option to auto-kill on
program start with the Quiet option)

I'm sure this is a small glitch that Benoit will soon fix though.
(I think Ben will also need to check and kill these obsolete folders too as
i had 180 of them!)

Do these folders have to be in ~/.local/share/ Ben?
if in Temp() they would be gone on each boot up.

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240215/26259724/attachment.htm>


More information about the User mailing list