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

QTemporaryDir creates 256 directories, yet isValid() returns false

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.4.1
    • 5.4.0
    • Core: I/O
    • None
    • Android 4.4.4 on Nexus 4 and 7
      Android 4.4.3 on Nexus 10
    • Android
    • 508b1fa173e135c839f07e0e4cd6009ac63a577c

    Description

      On Android, QTemporaryDir may create 256 directories for certain paths, yet isValid() returns false and path() returns empty string.

      This works correctly on Windows, but not on Android:

      QTemporaryDir temp(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + "/");

      EXPECTED: Either QTemporaryDir creates one directory, isValid() returns true and path() returns correct path, OR no directories are created, isValid() false etc.
      ACTUAL: QTemporaryDir may work correctly, or it creates 256 directories, isValid() returns false and path() returns empty.

      I suspect that QFileSystemEngine::setPermissions() call in q_mkdtemp() (qtemporarydir.cpp:127) fails for some reason, so the loop keeps creating new directories.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            juller Juha Riikonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes