mirror of
https://github.com/KevinMidboe/transatlanticTorrentExpress.git
synced 2025-10-29 18:00:19 +00:00
Escape spaces in file path for du command
This commit is contained in:
@@ -45,7 +45,7 @@ class File():
|
|||||||
|
|
||||||
def fileSize(self):
|
def fileSize(self):
|
||||||
filePath = self.system.buildFilePath(self)
|
filePath = self.system.buildFilePath(self)
|
||||||
cmd = "du -hs '{}'".format(filePath)
|
cmd = "du -hs '{}'".format(filePath.replace(' ', '\\ '))
|
||||||
|
|
||||||
if self.system.remote:
|
if self.system.remote:
|
||||||
cmd = 'ssh {}@{} {}'.format(self.system.user, self.system.host, cmd)
|
cmd = 'ssh {}@{} {}'.format(self.system.user, self.system.host, cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user