Fix remove_temp_files

This commit is contained in:
2022-06-27 18:36:43 +03:00
parent 316c4b9553
commit 45b1c78bff

View File

@@ -106,7 +106,11 @@ def remove_temp_files():
is_file = os.path.isfile(target_path)
try:
creation_time = os.path.getctime(target_path)
except FileNotFoundError:
continue
if (current_time - creation_time) // 3600 >= 3:
if is_file:
os.remove(target_path)