Add support for cloud placeholder on Windows (Such as OneDrive)

This commit is contained in:
2022-01-16 17:54:49 +08:00
parent d8f58df3e2
commit 84f2cb1fea
7 changed files with 67 additions and 10 deletions

View File

@@ -52,7 +52,7 @@ except ImportError:
cached_property = property
from os.path import exists, isfile, getsize
from os import remove
from game_backuper.file import mkdir_for_file
from game_backuper.file import mkdir_for_file, hydrate_file_if_needed
@unique
@@ -303,6 +303,7 @@ def decompress(src: str, dest: str, c: CompressConfig, name: str, prog: str):
if exists(dest):
remove(dest)
cs = c.chunk_size
hydrate_file_if_needed(fn)
if c.method == CompressMethod.BZIP2:
with BZ2File(fn, 'rb') as f:
with open(dest, 'wb') as t: