z-edit / zedit

An integrated development environment for Bethesda Plugin Files.
https://z-edit.github.io
MIT License
303 stars 56 forks source link

Issues with file paths longer than 256 characters #288

Open RoorMakurosu opened 2 years ago

RoorMakurosu commented 2 years ago

I get an error every time I want to merge mods which end up generating file paths longer than 256 characters.

Actually, the only way around it, for me, it has been to change the ZEdit Merges folder to something like "c:\Z\" in order to limit to "path overhead" to a minimum (my usual path is something like "C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Tools\ZEdit\merges\".

lord-mogul commented 1 year ago

That is a limitation with how Windows manages paths. For legacy reasons file names are still limited to 260 character path length (including the drive letter and a null character for termination) You could go around that by using symlinks or a shorter path, like a folder directly in the drive root.

But another thing is that write access in certain system folders, including Program Files and Program Files (x86) requires admin privileges, which causes other issues with older software that writes it's config files in it's installation directory. (personnally I'm just using C:\Games\ and C:\Steam\ for my installs to get around that)