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()
|
settings=Settings.query.first()
|
||||||
paths = settings.import_path.split("#")
|
paths = settings.import_path.split("#")
|
||||||
for path in paths:
|
for path in paths:
|
||||||
|
if not os.path.exists(path):
|
||||||
|
continue
|
||||||
prefix = SymlinkName("Import",path,path+'/')
|
prefix = SymlinkName("Import",path,path+'/')
|
||||||
if folders:
|
if folders:
|
||||||
entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many )
|
entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many )
|
||||||
@@ -273,6 +275,8 @@ def files_sp():
|
|||||||
settings=Settings.query.first()
|
settings=Settings.query.first()
|
||||||
paths = settings.storage_path.split("#")
|
paths = settings.storage_path.split("#")
|
||||||
for path in paths:
|
for path in paths:
|
||||||
|
if not os.path.exists(path):
|
||||||
|
continue
|
||||||
prefix = SymlinkName("Storage",path,path+'/')
|
prefix = SymlinkName("Storage",path,path+'/')
|
||||||
if folders:
|
if folders:
|
||||||
entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many )
|
entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many )
|
||||||
@@ -295,6 +299,8 @@ def files_rbp():
|
|||||||
settings=Settings.query.first()
|
settings=Settings.query.first()
|
||||||
paths = settings.recycle_bin_path.split("#")
|
paths = settings.recycle_bin_path.split("#")
|
||||||
for path in paths:
|
for path in paths:
|
||||||
|
if not os.path.exists(path):
|
||||||
|
continue
|
||||||
prefix = SymlinkName("Bin",path,path+'/')
|
prefix = SymlinkName("Bin",path,path+'/')
|
||||||
if folders:
|
if folders:
|
||||||
entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many )
|
entries+=GetEntriesInFolderView( cwd, prefix, noo, offset, how_many )
|
||||||
|
|||||||
Reference in New Issue
Block a user