Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27360

Regression: crash if QFileInfo::path() is called for a non-existent drive

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.8.3
    • Core: I/O
    • None
    • Windows 7 + Qt4.8.3 (compiled with Visual Studio x64 Cross Tools Command Prompt (2010))

      Error can be reproduced with Qt4.8.3 compiled with Visual Studio x64 Cross Tools Command Prompt (2010).
      With Qt4.8.1 compiled with Visual Studio x64 Cross Tools Command Prompt (2010) the use case works ok.

      Use case:

      Call a QFileInfo::path() (http://qt-project.org/doc/qt-4.8/qfileinfo.html#pathx) for a non-existant drive, for example:

      // note: drive 'e' does not exist
      QFileInfo info(QLatin1String("e:test.txt"));
      QString szPath=info.path(); 
      

      --> error: crash occurs.

      SHA fd2eb070128ab6ef6b5c9343a0921f6b5a0bc041 has modified QFileSystemEntry::path() function on
      $QTDIR\src\corelib\io\qfilesystementry.cpp. This has caused the regression.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes