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 )