- Timestamp:
- Feb 27, 2010, 12:27:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/io/qfsfileengine_iterator_os2.cpp
r564 r614 44 44 #include "qplatformdefs.h" 45 45 #include "qfsfileengine_iterator_p.h" 46 47 #include <qt_os2.h> 46 48 47 49 #include <QtCore/qvariant.h> … … 126 128 if (!path.endsWith(QLatin1Char('/'))) 127 129 path.append(QLatin1Char('/')); 128 if ((that->platform->dir = ::opendir(QFile::encodeName(path).data())) == 0) { 130 // check that the drive is ready before trying to open it which reduces 131 // delays and noise for drives with no media inserted 132 BYTE drv[3] = { path.at(0).cell(), ':', '\0' }; 133 BYTE buf[sizeof(FSQBUFFER2) + (3 * CCHMAXPATH)] = {0}; 134 ULONG bufSize = sizeof(buf); 135 PFSQBUFFER2 pfsq = (PFSQBUFFER2) buf; 136 APIRET arc = DosQueryFSAttach(drv, 0, FSAIL_QUERYNAME, pfsq, &bufSize); 137 if (arc != NO_ERROR) { 138 that->platform->dir = 0; 139 that->platform->done = true; 140 } else if ((that->platform->dir = ::opendir(QFile::encodeName(path).data())) == 0) { 129 141 that->platform->done = true; 130 142 } else {
Note:
See TracChangeset
for help on using the changeset viewer.