mirror of
https://github.com/KevinMidboe/transatlanticTorrentExpress.git
synced 2025-10-29 01:40:21 +00:00
Filepath over ssh should be wrapped in qoutes.
This is relevant for files with spaces or special characters that we want interpreted as a single parameter.
This commit is contained in:
@@ -45,10 +45,10 @@ class File():
|
||||
|
||||
def fileSize(self):
|
||||
filePath = self.system.buildFilePath(self)
|
||||
cmd = "du -hs '{}'".format(filePath.replace(' ', '\\ '))
|
||||
cmd = "du -hs '{}'".format(filePath)
|
||||
|
||||
if self.system.remote:
|
||||
cmd = 'ssh {}@{} {}'.format(self.system.user, self.system.host, cmd)
|
||||
cmd = 'ssh {}@{} "{}"'.format(self.system.user, self.system.host, cmd)
|
||||
|
||||
diskusageOutput = check_output(cmd, shell=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user