Enabling long path support for my application I have done the following:
- Embedded the
longPathAware
manifest into my application usingmt.exe
- Ensured that the
LongPathsEnabled
registry key is set to 1
My application actually started to be able to operate on files located in folders with long paths exceeding the 260
limit, however there exists a problem.
I found no way to start my application where a long path folder is my current working directory. I have tried using cmd
, MSYS2
, CygWin
, explorer
cmd
gives the following error:The current directory is invalid.
MSYS2
andCygWin
both give the following error:Error: Current working directory has a path longer than allowed for a Win32 working directory. Can't start native Windows application from here. bash: /c/myapp: File name too long
explorer
does the following:- The application icon becomes blank like the one for unknown file types or files with no extensions
- Double clicking on the application does nothing whatsoever
It is the most common use case for my application to have the files on which the application operates upon in the current working directory. So, given that the current working directory can't exceed that limit means that all of this is kind of useless.
So, my question is: Is there a way to overcome this issue/limitation?
I feel like without having this case working, the whole long paths support doesn't make any sense.