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

QFileInfo.size() for shortcut in windows is wrong!

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Duplicate
    • Affects Version/s: 5.4.1
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Environment:
      win7 x64, QT5.4.1 MINGW

      Description

      I copy these code from: http://doc.qt.io/qt-5/qfileinfo.html

      #ifdef Q_OS_WIN

      QFileInfo info1("C:
      Documents and Settings\\Bob
      untabify.lnk");
      info1.isSymLink();
      info1.absoluteFilePath();
      info1.size(); // it returns 63942, not 743, wrong!!!!
      info1.symLinkTarget();

      QFileInfo info2(info1.symLinkTarget());
      info2.isSymLink();
      info2.absoluteFilePath();
      info2.size(); // returns 63942

      #endif

      just change the shortcut to my own shortcut, but info1.size() and info2.size() have the same value, it is wrong! Please correct it!

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              stlcours cliff cours
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes