From d7eedf725d7d64d53d04ff724d893b04fc99e1be Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 24 Nov 2012 13:34:55 +0200 Subject: [PATCH] libdeng2|Fixed: CommandLine expands response file path (after @) --- doomsday/libdeng2/include/de/core/commandline.h | 2 +- doomsday/libdeng2/src/core/commandline.cpp | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/doomsday/libdeng2/include/de/core/commandline.h b/doomsday/libdeng2/include/de/core/commandline.h index 8347c00a56..df25a7cf75 100644 --- a/doomsday/libdeng2/include/de/core/commandline.h +++ b/doomsday/libdeng2/include/de/core/commandline.h @@ -166,7 +166,7 @@ namespace de * * @param nativePath File to parse. */ - void parseResponseFile(const String& nativePath); + void parseResponseFile(const NativePath& nativePath); /** * Breaks down a single string containing arguments. diff --git a/doomsday/libdeng2/src/core/commandline.cpp b/doomsday/libdeng2/src/core/commandline.cpp index 7631870244..d6bc03a823 100644 --- a/doomsday/libdeng2/src/core/commandline.cpp +++ b/doomsday/libdeng2/src/core/commandline.cpp @@ -283,15 +283,6 @@ void CommandLine::makeAbsolutePath(duint pos) bool converted = false; QDir dir(NativePath(arg).expand()); // note: strips trailing slash - /* -#ifdef UNIX - if(dir.path().startsWith("~/")) - { - dir.setPath(QDir::home().filePath(dir.path().mid(2))); - converted = true; - } - else -#endif*/ if(!QDir::isAbsolutePath(arg)) { dir.setPath(d->initialDir.filePath(dir.path())); @@ -319,11 +310,9 @@ void CommandLine::makeAbsolutePath(duint pos) } } -void CommandLine::parseResponseFile(const String& nativePath) +void CommandLine::parseResponseFile(const NativePath& nativePath) { - /// @todo Symbols like ~ should be expanded in @a nativePath. - - QFile response(nativePath); + QFile response(nativePath.expand()); if(response.open(QFile::ReadOnly | QFile::Text)) { parse(QString::fromUtf8(response.readAll().constData()));