Changeset 1146

Timestamp:
Mar 22, 2013, 5:22:31 PM (12 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib: Fix another regression of r1114 preventing Qt Creator from starting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/io/qfsfileengine_iterator_os2.cpp

    r1117 r1146  
    272272        } else {
    273273            // DosFindFirst is unaware of symlinks; help it with canonicalFilePath()
    274             QString mask = QFileInfo(path).canonicalFilePath().append(QLatin1String("/*"));
    275             mask = QDir::toNativeSeparators(QDir::cleanPath(mask));
     274            QString realPath = QFileInfo(path).canonicalFilePath();
     275            if (!realPath.isEmpty()) {
     276                realPath = QDir::toNativeSeparators(realPath);
     277                if (!realPath.endsWith(QLatin1Char('\\')))
     278                    realPath.append(QLatin1Char('\\'));
     279                realPath.append(QLatin1Char('*'));
     280            }
    276281            ULONG count = 1;
    277             if (DosFindFirst(QFile::encodeName(mask).constData(),
     282            if (realPath.isEmpty() ||
     283                DosFindFirst(QFile::encodeName(realPath).constData(),
    278284                             &that->platform->hdir,
    279285                             FILE_NORMAL | FILE_READONLY | FILE_HIDDEN |
Note: See TracChangeset for help on using the changeset viewer.