1
0
Fork 0
forked from len0rd/rockbox

The mountpoint is stored with normalized separators.

Make sure to convert it on reading to avoid not finding it even if stored with
native separators in the configuration. Fix a warning on Windows.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30145 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2011-07-17 08:08:51 +00:00
parent 99408dd45e
commit b7fe90aa36
2 changed files with 3 additions and 3 deletions

View file

@ -116,7 +116,7 @@ QString Utils::filesystemName(QString path)
#if defined(Q_OS_WIN32)
wchar_t volname[MAX_PATH+1];
bool res = GetVolumeInformationW((LPTSTR)path.utf16(), volname, MAX_PATH+1,
NULL, NULL, NULL, NULL, NULL);
NULL, NULL, NULL, NULL, 0);
if(res) {
name = QString::fromWCharArray(volname);
}

View file

@ -278,7 +278,7 @@ void Config::setUserSettings()
// devices tab
refreshMountpoint();
mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
mountpoint = QDir::toNativeSeparators(RbSettings::value(RbSettings::Mountpoint).toString());
setMountpoint(mountpoint);
// cache tab
@ -426,7 +426,7 @@ void Config::updateTtsState(int index)
ui.configTTSstatusimg->setPixmap(QPixmap(QString::fromUtf8(":/icons/dialog-error.png")));
ui.testTTS->setEnabled(false);
}
delete tts; /* Config objects are never deleted (in fact, they are leaked..), so we can't rely on QObject,
since that would delete the TTSBase instance on application exit*/
}