1
0
Fork 0
forked from len0rd/rockbox

Don't try to resolve an empty path.

An empty path is not resolvable, so immediately return an empty result. Fixes
an empty path resolve to "/" on Linux / OS X.

Change-Id: I22c26a7716becbf46850a04e18ee581084546263
This commit is contained in:
Dominik Riebeling 2012-05-11 22:05:09 +02:00
parent fbe9ccc85c
commit 4b5348ba04

View file

@ -90,11 +90,12 @@ bool Utils::recursiveRmdir( const QString &dirName )
//! @return returns exact casing of path, empty string if path not found.
QString Utils::resolvePathCase(QString path)
{
QStringList elems;
QString realpath;
elems = path.split("/", QString::SkipEmptyParts);
int start;
QString realpath;
QStringList elems = path.split("/", QString::SkipEmptyParts);
if(path.isEmpty())
return QString();
#if defined(Q_OS_WIN32)
// on windows we must make sure to start with the first entry (i.e. the
// drive letter) instead of a single / to make resolving work.