try fix issue 616: onedrive OSError input/output

This commit is contained in:
lededev
2021-10-15 09:11:40 +08:00
parent f26987ddf9
commit 317449c568
2 changed files with 11 additions and 8 deletions

View File

@@ -622,3 +622,6 @@ def file_modification_days(filename) -> int:
if days < 0:
return 9999
return days
def file_not_exist_or_empty(filepath) -> bool:
return not os.path.isfile(filepath) or os.path.getsize(filepath) == 0