autoremove should not break if file doesnt exist
This commit is contained in:
@@ -84,6 +84,8 @@ def file_autoremove(path, share, notifier = None):
|
|||||||
share['path'],
|
share['path'],
|
||||||
path
|
path
|
||||||
)
|
)
|
||||||
|
if not os.path.exists(full_path):
|
||||||
|
return False
|
||||||
age, age_str = file_age(full_path)
|
age, age_str = file_age(full_path)
|
||||||
if age.days >= autoremove:
|
if age.days >= autoremove:
|
||||||
os.remove(full_path)
|
os.remove(full_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user