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

QFileInfo::size() reports the size of symlink target instead of the link file itself, contrary to the documentation

XMLWordPrintable

    • Windows
    • abfac029ceaf6c3199694a505f312ace347b8245 (qt/qtbase/5.13)

      I've noticed this error a while back in my Qt-based file manager application. When I got around to fixing it, I've found that other people have discovered it as well: https://stackoverflow.com/questions/53411886/qfileinfo-size-is-returning-shortcut-target-size

      Note how difficult it is to get the true size of a link file. And, of course, the documentation states that size() should not follow the symlink.

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

            thiago Thiago Macieira
            alexium Alex
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes