reporter
This commit is contained in:
+3
-2
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import unicodedata
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
@@ -18,8 +19,8 @@ def scan_files(root_path: str) -> dict:
|
||||
stat = os.stat(full_path)
|
||||
except (FileNotFoundError, PermissionError):
|
||||
continue
|
||||
rel_path = os.path.relpath(full_path, root_path).replace("\\", "/")
|
||||
rel_dir = os.path.relpath(root, root_path).replace("\\", "/")
|
||||
rel_path = unicodedata.normalize("NFC", os.path.relpath(full_path, root_path).replace("\\", "/"))
|
||||
rel_dir = unicodedata.normalize("NFC", os.path.relpath(root, root_path).replace("\\", "/"))
|
||||
# Truncate microseconds — MySQL DATETIME rounds to whole seconds,
|
||||
# which causes false "modified" detections on every run.
|
||||
mtime = datetime.fromtimestamp(stat.st_mtime).replace(microsecond=0)
|
||||
|
||||
Reference in New Issue
Block a user