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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 5.4.1
    • Core: I/O
    • None
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: