There's also a Group Policy setting that can be made on your machine that behind the scenes affects the above registry key.
This enables Windows support for long path names via the core Windows APIs without explicitly having to specify extended path syntax ( \\?\ prefixed described below). Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem `
Or you can use Powershell from an Adminstrative Terminal: Set-ItemProperty ` reg file and run it as Administrator, or enter the key and value into the registry directly: Windows Registry Editor Version 5.00
Registry Keyįor a typical developer the easiest way to add support is via the registry setting.Ĭopy the following text to a. There are two ways to enable the core Windows support for long path names.
Making it Work Anyway!Īs of Windows 10 Version 1607 there are improvements that can make things better with Long Path Support via here are configuration settings at the Windows and Application level. Long story short Long Path names are still a problem on Windows. For example, NPM in the past would create package dependencies as a nested tree that frequently overshot the 255 limit and ended up creating folders and files that were very difficult to access and even remove using just basic Windows built-in applications.
The more common scenarios is that you run into problems with automated tools or development environments that don't primarily run on Windows. That's not to say this never happens but there probably are ways to minimize the size of these path lengths with some prudence in folder naming.
While trying to duplicate the problem I created a folder structure that would exceed 260 characters in my Documents hierarchy and it took 8 levels down plus insanely long, spaced out folder names to get there. Just creating a repro case for the bug report took a while to actually build folders deep enough to trigger errors - I thought 260 chars would have come a lot sooner than they actually did! But apparently it happens quite a bit anyway ? as I see errors like this in my logs on a regular basis.
It's pretty freaking long and for manual folder creation - which is the likely use case in Markdown Monster - you have to work pretty hard to get near the 260 character limit. To be clear: 260 characters is not exactly small for a folder and file path. Depending on the operation, files either would not open with File not found errors, or outright crash the application.
NET Full Framework ( net472) application, this means it can't open or save files that are 260 characters or longer and this was the cause of the problems reported in the Bug report. This is true of raw Windows APIs as well as high level runtimes like the. It's very insidious how deeply embedded this problem is. Most applications don't work with them and even if they do there may be odd behaviors caused by interaction with other applications, components or tools that don't. It's an inherent issue in Windows because the base Windows file APIs by default don't recognize these long paths. For example, Explorer won't let you create a folder name that ends up with a path that is longer than 260 characters and you can delete folders or files in folders that exceed the MAX_PATH limit.
It's not just Markdown Monster - even Windows Explorer and command shells like PowerShell and Command have issues with long paths. The native Windows APIs can handle files up to the 260 character limit, but exceed that and lots of things go boom. Windows traditionally has a 260 character path limit which applies to both the folder + filename combination. I've seen file IO errors for opening files not found in my application logs, and most of these are probably caused by this very same scenario. The direct file open is one scenario, but this can come up plenty of other scenarios too - opening related assets like image files or saving a new file in a folder that has a long path. Any file opened in this path would fail with a File not found exception which would then not open the file in Markdown Monster. After a bit of back and forth, it turns out the user was trying open a file in a folder that exceeded Windows MAX_PATH limit, which is 260 characters. Odd, because if that was a wide-spread problem I'd hear about this no end, but this was a one-off bug report. Today I got a bug report for Markdown Monster that said that Markdown files could not be opened from certain locations.