Fix path splitting error on Windows

This commit is contained in:
Sergey Zolotarev 2024-03-09 00:51:31 +06:00 committed by Hans-Christoph Steiner
parent 980ff3c20a
commit 6d71690946
1 changed files with 1 additions and 1 deletions

View File

@ -556,7 +556,7 @@ def parse_mirrors_config(mirrors):
def file_entry(filename, hash_value=None):
meta = {}
meta["name"] = "/" + filename.split("/", 1)[1]
meta["name"] = "/" + Path(filename).as_posix().split("/", 1)[1]
meta["sha256"] = hash_value or common.sha256sum(filename)
meta["size"] = os.stat(filename).st_size
return meta