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:
parent
fbe9ccc85c
commit
4b5348ba04
1 changed files with 5 additions and 4 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue