You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
context: I am developing a gallery with more than 2000 photos
I noticed that during development, the space on the C drive is rapidly disappearing. And I found that Lorca creates temporary folders (lorca2959578984 - like these) every time you start it in C:\Users\USERNAME\AppData\Local\Temp
For myself, I solved the problem with a function that deletes all such folders, except for the very last one:
func removeLorcaTemp() {
var lfolders []TmpFolder
dirname, err := os.UserHomeDir()
if err != nil {
log.Fatal(err)
}
p := dirname + \"\\AppData\\Local\\Temp\"
sf, err := scanFolder(p) //custom function waslks the path
for _, path := range sf {
if strings.Contains(path, "lorca") {
f, err := os.Stat(p + "\\" + path)
if err != nil {
log.Fatalf("err reading: %v", err)
}
lfolders = append(lfolders, TmpFolder{path, f.ModTime().Unix()})
}
}
sort.SliceStable(lfolders, func(i, j int) bool {
return lfolders[i].Time < lfolders[j].Time
})
for i, f := range lfolders {
if i != len(lfolders)-1 {
fmt.Println(f)
err := os.RemoveAll(p + "\\" + f.Path)
if err != nil {
log.Println(err)
}
}
}
}
The text was updated successfully, but these errors were encountered:
context: I am developing a gallery with more than 2000 photos
I noticed that during development, the space on the C drive is rapidly disappearing. And I found that Lorca creates temporary folders (lorca2959578984 - like these) every time you start it in C:\Users\USERNAME\AppData\Local\Temp
For myself, I solved the problem with a function that deletes all such folders, except for the very last one:
The text was updated successfully, but these errors were encountered: