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

QTemporaryDir is not canonical anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.2
    • Core: I/O
    • None
    • 14f792040 (3.1)

      Since 6.9.2 (maybe earlier), QTemporaryDir::path() does not return canonical path anymore.

      This makes it harder to calculate relative paths between canonical/non-canonical version of the same path.

      #include <QCoreApplication>
      #include <QTextStream>
      #include <QTemporaryDir>
      #include <cstdio>
      
      int main()
      {
          QTextStream ts(stdout);
          ts << QCoreApplication::translate("hello", "Hello, World!\n");
          QTemporaryDir d;
          ts << d.path();
          ts.flush();
      }
      

      With 6.8.3: path starts with /var/private:

      /private/var/folders/jw/xxt0trhn3b7g56d10bj997nm0000gn/T/qt_temp-SAnbymMacBook-Pro:helloworld-qt
      

      With 6.9.2: path starts with /var:

      /var/folders/jw/xxt0trhn3b7g56d10bj997nm0000gn/T/qt_temp-tGZQyGMacBook-Pro:helloworld-qt
      

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

            thiago Thiago Macieira
            arch Ivan Komissarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes