From 42f909a25134ca7ba6874b863840217efce492ac Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Fri, 25 Aug 2023 20:30:09 +0200 Subject: [PATCH] Escape spaces in file path for du command --- transatlanticTorrentExpress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transatlanticTorrentExpress.py b/transatlanticTorrentExpress.py index 57d79cd..b0dcd9e 100755 --- a/transatlanticTorrentExpress.py +++ b/transatlanticTorrentExpress.py @@ -45,7 +45,7 @@ class File(): def fileSize(self): filePath = self.system.buildFilePath(self) - cmd = "du -hs '{}'".format(filePath) + cmd = "du -hs '{}'".format(filePath.replace(' ', '\\ ')) if self.system.remote: cmd = 'ssh {}@{} {}'.format(self.system.user, self.system.host, cmd)