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

Regression:QFileInfo::path inconsistent behiviour

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.4
    • 4.8.3
    • Core: I/O
    • None
    • Windows

    Description

      QFileInfo::path() returns absolute path instead of relative path. which is inconsistent with older behavior on windows.
      Following code can be used to see the behavior. The first out put is inconsistent with other two it return absolute path where as other prints relative path.

      QFileInfo info1(QLatin1String("C:"));
      qDebug()<<info1.path();

      QFileInfo info2(QLatin1String("dir/file"));
      qDebug()<<info2.path();

      QFileInfo info3(QLatin1String("file"));
      qDebug()<<info3.path();

      Output :
      "C:\the\current\path"
      "dir"
      "."

      following change id introduced this in Qt 4.8.3
      Change-Id: I47a197c6af066f532442ad269be57597ec61303a

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes