fix BUG with non-existant path causing re-render of previous path
This commit is contained in:
6
files.py
6
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 )
|
||||
|
||||
Reference in New Issue
Block a user