mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-08 05:51:41 -07:00
largefiles in WindowsBuilder.py
This commit is contained in:
parent
ee7d471f20
commit
645065df58
5 changed files with 55 additions and 33 deletions
|
@ -51,8 +51,6 @@ class SplittedFile:
|
|||
...
|
||||
merged to filename.ext
|
||||
"""
|
||||
if filepath.exists():
|
||||
return
|
||||
|
||||
parts : List[Path] = []
|
||||
for n in itertools.count(start=0):
|
||||
|
@ -63,13 +61,14 @@ class SplittedFile:
|
|||
break
|
||||
|
||||
if len(parts) != 0:
|
||||
bytes_parts = []
|
||||
for part_filepath in parts:
|
||||
bytes_parts.append( part_filepath.read_bytes() )
|
||||
|
||||
b = b''.join(bytes_parts)
|
||||
|
||||
filepath.write_bytes(b)
|
||||
if not filepath.exists():
|
||||
bytes_parts = []
|
||||
for part_filepath in parts:
|
||||
bytes_parts.append( part_filepath.read_bytes() )
|
||||
|
||||
b = b''.join(bytes_parts)
|
||||
|
||||
filepath.write_bytes(b)
|
||||
|
||||
if delete_parts:
|
||||
for part_filepath in parts:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue