Fix path splitting error on Windows
This commit is contained in:
parent
980ff3c20a
commit
6d71690946
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue