소스 검색

compute OS-independent hash (fixes #1301)

Falko Schindler 1 년 전
부모
커밋
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: