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 6 Nov 2017, 16:39 last edited by Maarten Verhage 11 Jun 2017, 16:54
    #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

    K 1 Reply Last reply 6 Nov 2017, 16:52
    0
    • M Maarten Verhage
      6 Nov 2017, 16:39

      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

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 6 Nov 2017, 16:52 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

      R 1 Reply Last reply 6 Mar 2025, 12:06
      3
      • K kshegunov
        6 Nov 2017, 16:52

        @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.

        R Offline
        R Offline
        RokeJulianLockhart
        wrote on 6 Mar 2025, 12:06 last edited by RokeJulianLockhart 16 days from now
        #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.

        K 1 Reply Last reply 7 Mar 2025, 06:41
        0
        • R RokeJulianLockhart
          6 Mar 2025, 12:06

          @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.

          K Offline
          K Offline
          kshegunov
          Moderators
          wrote on 7 Mar 2025, 06:41 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