Skip to content

Commit

Permalink
libdeng2|Fixed: CommandLine expands response file path (after @)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 24, 2012
1 parent 7d2842b commit d7eedf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doomsday/libdeng2/include/de/core/commandline.h
Expand Up @@ -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.
Expand Down
15 changes: 2 additions & 13 deletions doomsday/libdeng2/src/core/commandline.cpp
Expand Up @@ -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()));
Expand Down Expand Up @@ -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()));
Expand Down

0 comments on commit d7eedf7

Please sign in to comment.