From 1d97479f41246985674f6e403f1f948ba706c6b4 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 23 Aug 2020 22:20:04 -0700 Subject: [PATCH] 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. --- rarpar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rarpar.py b/rarpar.py index 7b47fff..ebc9647 100644 --- a/rarpar.py +++ b/rarpar.py @@ -107,7 +107,8 @@ def assert_enough_space(pathsize, workdir, moveto, rec, rev, par): if moveto is not None: 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([ f'For {bytestring.bytestring(pathsize)},',