bug fix: relative path issue while compressing

This commit is contained in:
Usman Nasir
2019-08-29 17:05:46 +05:00
parent d369cea2bc
commit b1e519bc3a
2 changed files with 6 additions and 3 deletions

View File

@@ -386,9 +386,12 @@ class FileManager:
command = 'tar -czvf ' + compressedFileName + ' '
for item in self.data['listOfFiles']:
command = command + self.returnPathEnclosed(self.data['basePath'] + '/' + item) + ' '
command = '%s%s ' % (command, self.returnPathEnclosed(item))
ProcessUtilities.executioner(command, website.externalApp)
finalCommand = 'cd %s && %s' % (self.data['basePath'], command)
ProcessUtilities.executioner(finalCommand, website.externalApp)
self.changeOwner(self.data['compressedFileName'])

View File

@@ -198,7 +198,7 @@ class ProcessUtilities(multi.Thread):
command = command.replace('sudo', '')
sock.sendall(command)
#logging.writeToFile(command)
logging.writeToFile(command)
data = ""