From 68d1fcac60790ce0061e1aaddc95ea970490cf14 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 27 Jun 2021 14:30:33 +1000 Subject: [PATCH] fix BUG with non-existant path causing re-render of previous path --- files.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/files.py b/files.py index e6bdf90..2fb6389 100644 --- a/files.py +++ b/files.py @@ -252,6 +252,8 @@ def files_ip(): settings=Settings.query.first() paths = settings.import_path.split("#") for path in paths: + if not os.path.exists(path): + continue prefix = SymlinkName("Import",path,path+'/') if folders: entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many ) @@ -273,6 +275,8 @@ def files_sp(): settings=Settings.query.first() paths = settings.storage_path.split("#") for path in paths: + if not os.path.exists(path): + continue prefix = SymlinkName("Storage",path,path+'/') if folders: entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many ) @@ -295,6 +299,8 @@ def files_rbp(): settings=Settings.query.first() paths = settings.recycle_bin_path.split("#") for path in paths: + if not os.path.exists(path): + continue prefix = SymlinkName("Bin",path,path+'/') if folders: entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many )