Skip to content

Commit 7b7549d

Browse files
committed
bug fix: relative path issue while compressing
1 parent eb80ea8 commit 7b7549d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

filemanager/filemanager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,12 @@ def compress(self):
386386
command = 'tar -czvf ' + compressedFileName + ' '
387387

388388
for item in self.data['listOfFiles']:
389-
command = command + self.returnPathEnclosed(self.data['basePath'] + '/' + item) + ' '
389+
command = '%s%s ' % (command, self.returnPathEnclosed(item))
390390

391-
ProcessUtilities.executioner(command, website.externalApp)
391+
392+
finalCommand = 'cd %s && %s' % (self.data['basePath'], command)
393+
394+
ProcessUtilities.executioner(finalCommand, website.externalApp)
392395

393396
self.changeOwner(self.data['compressedFileName'])
394397

plogical/processUtilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def sendCommand(command, user=None):
198198
command = command.replace('sudo', '')
199199
sock.sendall(command)
200200

201-
#logging.writeToFile(command)
201+
logging.writeToFile(command)
202202

203203
data = ""
204204

0 commit comments

Comments
 (0)