Avoid console windows when setting sparse flag on Windows
This commit is contained in:
parent
4c6e01d38d
commit
b41570b663
1 changed files with 3 additions and 1 deletions
|
@ -340,7 +340,9 @@ class SiteStoragePlugin(object):
|
|||
f.truncate(size)
|
||||
f.close()
|
||||
if os.name == "nt":
|
||||
subprocess.call(["fsutil", "sparse", "setflag", file_path])
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
subprocess.call(["fsutil", "sparse", "setflag", file_path], close_fds=True, startupinfo=startupinfo)
|
||||
|
||||
if sha512 and sha512 in self.piecefields:
|
||||
self.log.debug("%s: File not exists, but has piecefield. Deleting piecefield." % inner_path)
|
||||
|
|
Loading…
Reference in a new issue