fix #5015 overlay icon not show: compare folder paths with no case-se…
This commit is contained in:
Olivier Goffart 2016-07-12 14:32:54 +02:00 committed by GitHub
commit b53ce78eb6
2 changed files with 8 additions and 7 deletions

View file

@ -110,17 +110,17 @@ IFACEMETHODIMP OCOverlay::GetPriority(int *pPriority)
// we order this in terms of likelyhood
switch (_state) {
case State_OK:
*pPriority = 0;
*pPriority = 0; break;
case State_OKShared:
*pPriority = 1;
*pPriority = 1; break;
case State_Warning:
*pPriority = 2;
*pPriority = 2; break;
case State_Sync:
*pPriority = 3;
*pPriority = 3; break;
case State_Error:
*pPriority = 4;
*pPriority = 4; break;
default:
*pPriority = 5;
*pPriority = 5; break;
}
return S_OK;

View file

@ -849,7 +849,8 @@ Folder *FolderMan::folderForPath(const QString &path)
foreach(Folder* folder, this->map().values()) {
const QString folderPath = folder->cleanPath()+QLatin1Char('/');
if(absolutePath.startsWith(folderPath)) {
if(absolutePath.startsWith(folderPath, (Utility::isWindows() || Utility::isMac())?
Qt::CaseInsensitive : Qt::CaseSensitive)) {
//qDebug() << "found folder: " << folder->path() << " for " << absolutePath;
return folder;
}