From 907842d5cc54049937704db49abd09e5f4c759ed Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 29 Oct 2020 15:53:03 -0700 Subject: [PATCH] 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. --- rarpar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rarpar.py b/rarpar.py index a9971d3..5934027 100644 --- a/rarpar.py +++ b/rarpar.py @@ -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: