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

QDir fails for paths of length over 260 characters

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Commits:
      e21522b8bf (qt/qtbase/dev) e21522b8bf (qt/tqtc-qtbase/dev) 9fc2a1f4c5 (qt/tqtc-qtbase/6.2) 15d4bb9940 (qt/tqtc-qtbase/5.15)

      Description

      Hello,

      There seems to be an issue using QDir on windows when working with very large file paths.

      For example if one tries to use QDir::current() or QDir::currentPath() , you get some un-expected behavior. This occurs when the path one is trying to get is over 260 characters in length. 

      This seems to be in part due to the fact that qfilesystemengine_win.cpp uses a PATH_MAX instead of using the actual size of the path. This results in undesirable behavior when this maximum path length is exceeded, like when the path is over 260 characters. 

      QDir::currentPath() for example returns a string containing uninitialized memory in this situation. 

        Attachments

        For Gerrit Dashboard: QTBUG-103852
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            benjamin.hadra Benjamin Hadra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews