1
0
Эх сурвалжийг харах

compute OS-independent hash (fixes #1301)

Falko Schindler 1 жил өмнө
parent
commit
d9186abc7d
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      nicegui/helpers.py

+ 1 - 1
nicegui/helpers.py

@@ -57,7 +57,7 @@ def is_file(path: Optional[Union[str, Path]]) -> bool:
 
 
 def hash_file_path(path: Path) -> str:
-    return hashlib.sha256(str(path).encode()).hexdigest()[:32]
+    return hashlib.sha256(path.as_posix().encode()).hexdigest()[:32]
 
 
 def safe_invoke(func: Union[Callable[..., Any], Awaitable], client: Optional['Client'] = None) -> None: