Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Does QDir impose a maximum path limit on Windows?

Does QDir impose a maximum path limit on Windows?

Scheduled Pinned Locked Moved Solved General and Desktop
qdircreatefilepath limit
4 Posts 3 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Maarten Verhage
    wrote on last edited by Maarten Verhage
    #1

    Dear Qt experts,

    I was reading through Qt Assistant 5.3.2 and I didn't found info on this topic. I'm using Windows 7 SP1 64-bit. According to the Windows API functions the unicode versions of the functions like CreateFileW have a path limit of 32,767 wide characters when the path is prepended with "\\?\". Does Qt call the winapi functions with this prepend? I hope QDir isn't limited by MAX_PATH of 260 characters. But I think I still have the responsibility not to exceed the number of 32,767 for Qt development on Windows, right?

    Thank you very much for your attention and time!
    Best regards,
    Maarten

    kshegunovK 1 Reply Last reply
    0
    • M Maarten Verhage

      Dear Qt experts,

      I was reading through Qt Assistant 5.3.2 and I didn't found info on this topic. I'm using Windows 7 SP1 64-bit. According to the Windows API functions the unicode versions of the functions like CreateFileW have a path limit of 32,767 wide characters when the path is prepended with "\\?\". Does Qt call the winapi functions with this prepend? I hope QDir isn't limited by MAX_PATH of 260 characters. But I think I still have the responsibility not to exceed the number of 32,767 for Qt development on Windows, right?

      Thank you very much for your attention and time!
      Best regards,
      Maarten

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      @Maarten-Verhage said in Does QDir impose a maximum path limit on Windows?:

      When the path is prepended with "\?". Does Qt call the winapi functions with this prepend?

      Yes, here and here.

      But I think I still have the responsibility not to exceed the number of 32,767 for Qt development on Windows, right?

      As far as I can see in the source, yes, you do.

      Read and abide by the Qt Code of Conduct

      RokeJulianLockhartR 1 Reply Last reply
      3
      • kshegunovK kshegunov

        @Maarten-Verhage said in Does QDir impose a maximum path limit on Windows?:

        When the path is prepended with "\?". Does Qt call the winapi functions with this prepend?

        Yes, here and here.

        But I think I still have the responsibility not to exceed the number of 32,767 for Qt development on Windows, right?

        As far as I can see in the source, yes, you do.

        RokeJulianLockhartR Offline
        RokeJulianLockhartR Offline
        RokeJulianLockhart
        wrote on last edited by RokeJulianLockhart
        #3

        @kshegunov, does this override LongPathsEnabled's MAX_PATH bypass for non-NT Object Manager, Win32 Device Namespace, and/or UNC paths? I ask for github.com/Murmele/Gittyup/issues/827.

        When using a forum, remember to tag the person you are responding to, in case they are not subscribed to the thread.

        kshegunovK 1 Reply Last reply
        0
        • RokeJulianLockhartR RokeJulianLockhart

          @kshegunov, does this override LongPathsEnabled's MAX_PATH bypass for non-NT Object Manager, Win32 Device Namespace, and/or UNC paths? I ask for github.com/Murmele/Gittyup/issues/827.

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          Shouldn't, but I don't know.
          As far as links go, these seem to point to a newer version of the code. Bear in mind the original post was 7 years ago ...

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved