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

Linux/autofs: QFileInfo.exists("nonexisting_file") actually creates directory if it does not exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.0
    • Core: I/O
    • None

      Subtask of http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1361 (Qt Creator checking for version control
      directories .git/.hg and qmake.cache and accidentally creating them when used with autofs ):

      The following code causes autofs to create a directory called ".willi":

      QDir dir (".");
      
      do {
      if (QFileInfo(dir,".willi" ).exists())
      
      { qDebug() << dir.absolutePath(); return 1; }
      } while (dir.cdUp());
      
      dr-xr-xr-x 3 root root 0 7. Mai 16:00 .qmake.cache
      dr-xr-xr-x 3 root root 0 7. Mai 16:00 .hg
      dr-xr-xr-x 3 root root 0 7. Mai 16:00 .git
      dr-xr-xr-x 3 root root 0 7. Mai 16:06 .willi
      drwxr-xr-x 10 root root 0 7. Mai 16:06 .
      

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

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            kleint Friedemann Kleint
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes