Add os.sep to workdrive_drive splitdrive to fix disk usage reading.
Splitdrive returns "C:" on Windows and "" on Linux, and passing this into disk_usage actually returns info about the cwd disk.
This commit is contained in:
parent
6552740df9
commit
907842d5cc
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ def assert_enough_space(pathsize, workdir, moveto, rec, rev, par):
|
|||
needed = pathsize * (1 + plus_percent)
|
||||
reserve = RESERVE_SPACE_ON_DRIVE + needed
|
||||
|
||||
workdir_drive = os.path.splitdrive(workdir.absolute_path)[0]
|
||||
workdir_drive = os.path.splitdrive(workdir.absolute_path)[0] + os.sep
|
||||
free_space = shutil.disk_usage(workdir_drive).free
|
||||
|
||||
if moveto is not None:
|
||||
|
|
Loading…
Reference in a new issue