Fix free_space calculating incorrectly when using mounted drives.
If the file is on a drive mounted to a path, it was previously calculating the free space on the mount drive, instead of whatever the moveto drive was.
This commit is contained in:
parent
57e56f3f02
commit
1d97479f41
1 changed files with 2 additions and 1 deletions
|
@ -107,7 +107,8 @@ def assert_enough_space(pathsize, workdir, moveto, rec, rev, par):
|
||||||
|
|
||||||
if moveto is not None:
|
if moveto is not None:
|
||||||
moveto_drive = os.path.splitdrive(moveto.absolute_path)[0]
|
moveto_drive = os.path.splitdrive(moveto.absolute_path)[0]
|
||||||
free_space = min(free_space, shutil.disk_usage(moveto_drive).free)
|
moveto_drive = pathclass.Path(moveto_drive)
|
||||||
|
free_space = min(free_space, shutil.disk_usage(moveto_drive.absolute_path).free)
|
||||||
|
|
||||||
message = ' '.join([
|
message = ' '.join([
|
||||||
f'For {bytestring.bytestring(pathsize)},',
|
f'For {bytestring.bytestring(pathsize)},',
|
||||||
|
|
Loading…
Reference in a new issue