mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Fix errors in file size for properties window
When getting the size of directory, the function now skips symlinks to prevernt errors
This commit is contained in:
@@ -90,6 +90,8 @@ class FlattoolGuiWindow(Adw.ApplicationWindow):
|
||||
try:
|
||||
# print("[+] Getting the size of", directory)
|
||||
for entry in os.scandir(directory):
|
||||
if entry.is_symlink():
|
||||
continue # Skip symlinks
|
||||
if entry.is_file():
|
||||
# if it's a file, use stat() function
|
||||
total += entry.stat().st_size
|
||||
|
||||
Reference in New Issue
Block a user