From ce94c74b8bfb69b94bdb78aaa60d7dce2d058184 Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Sun, 7 Jan 2018 13:23:31 +0100 Subject: ZIP download: don't include path in filenames --- src/webbox.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webbox.cpp b/src/webbox.cpp index 190d7e7..4575551 100644 --- a/src/webbox.cpp +++ b/src/webbox.cpp @@ -229,7 +229,8 @@ int main(int argc, char* argv[]) { tempfile.close(); tempfile.remove(); - argumentList << tempfileName; // zip filename + argumentList << "-r"; // recursive packing + argumentList << tempfilePath + "/" + tempfileName; // zip filename while (!xml.atEnd()) { while (xml.readNextStartElement()) { @@ -238,7 +239,7 @@ int main(int argc, char* argv[]) { if (xml.name() == "file") { QString filename = xml.readElementText(); - argumentList.append(path + filename); // add parts + argumentList.append(filename); // add parts } } } @@ -246,7 +247,7 @@ int main(int argc, char* argv[]) { } QProcess process; - process.setWorkingDirectory(tempfilePath); + process.setWorkingDirectory(path); process.setProgram("/usr/bin/zip"); process.setArguments(argumentList); process.start(); -- cgit v1.2.3