summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRoland Stigge <stigge@antcom.de>2018-01-07 13:23:31 +0100
committerRoland Stigge <stigge@antcom.de>2018-01-07 13:23:31 +0100
commitce94c74b8bfb69b94bdb78aaa60d7dce2d058184 (patch)
tree1cd00de85e9ed321b927a0af8fe42faf2ea3dbe4
parent3bccf120e0a6653804a1678f383e973ceffb9955 (diff)
ZIP download: don't include path in filenames
-rw-r--r--src/webbox.cpp7
1 files 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();