diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-25 02:46:06 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-25 02:46:06 +0100 |
commit | 8edd0100e852cda9f44abd12cc06931542a2004a (patch) | |
tree | 7ce0510e5190d9dd153552159806367a3e60eea6 /logic/updater | |
parent | e3389a4eef5beaa8db49fcd82a8b725f234d3840 (diff) | |
download | MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar.gz MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar.lz MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.tar.xz MultiMC-8edd0100e852cda9f44abd12cc06931542a2004a.zip |
Fix more updater derps.
* Updater requires unix style paths on input.
* No update notification was getting cloned with every check
Diffstat (limited to 'logic/updater')
-rw-r--r-- | logic/updater/DownloadUpdateTask.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/logic/updater/DownloadUpdateTask.cpp b/logic/updater/DownloadUpdateTask.cpp index 5f05b0ba..057ca436 100644 --- a/logic/updater/DownloadUpdateTask.cpp +++ b/logic/updater/DownloadUpdateTask.cpp @@ -438,9 +438,6 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin { QDomElement file = doc.createElement("file"); - QString native_file = QDir::toNativeSeparators(op.file); - QString native_dest = QDir::toNativeSeparators(op.dest); - switch (op.type) { case UpdateOperation::OP_COPY: @@ -449,8 +446,8 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin QDomElement name = doc.createElement("source"); QDomElement path = doc.createElement("dest"); QDomElement mode = doc.createElement("mode"); - name.appendChild(doc.createTextNode(native_file)); - path.appendChild(doc.createTextNode(native_dest)); + name.appendChild(doc.createTextNode(op.file)); + path.appendChild(doc.createTextNode(op.dest)); // We need to add a 0 at the beginning here, because Qt doesn't convert to octal // correctly. mode.appendChild(doc.createTextNode("0" + QString::number(op.mode, 8))); @@ -458,16 +455,16 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin file.appendChild(path); file.appendChild(mode); installFiles.appendChild(file); - QLOG_DEBUG() << "Will install file" << native_file; + QLOG_DEBUG() << "Will install file " << op.file << " to " << op.dest; } break; case UpdateOperation::OP_DELETE: { // Delete the file. - file.appendChild(doc.createTextNode(native_file)); + file.appendChild(doc.createTextNode(op.file)); removeFiles.appendChild(file); - QLOG_DEBUG() << "Will remove file" << native_file; + QLOG_DEBUG() << "Will remove file" << op.file; } break; |