Ticket #287: capitalize-drive-letter2.diff

File capitalize-drive-letter2.diff, 776 bytes (added by KO Myung-Hun, 6 years ago)

More strictly check a drive letter

  • src/gui/dialogs/qfilesystemmodel.cpp

     
    363363    else
    364364        absolutePath = QDir(longPath).absolutePath();
    365365
     366#ifdef Q_OS_OS2
     367    if (absolutePath.length() >= 2 && absolutePath.at(0).isLetter() && absolutePath.at(1) == QLatin1Char(':'))
     368        absolutePath[0] = absolutePath.at(0).toUpper(); // capital drive letters
     369#endif
     370
    366371    QStringList pathElements = absolutePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
    367372    if ((pathElements.isEmpty())
    368373#if (!defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(Q_OS_SYMBIAN) && !defined(Q_OS_OS2)