Brief description of the issue:
FS2020 is not handling physical path longer than 260 characters
→ See below for explanation and possible solutions.
Did you submit this to Zendesk? If so, what is your ticket #?
NB: I’ve been wondering about FS2020 and the way it is handling paths from some time and I’ve already posted most of the information below already, but recent news were compelling enough to raise this as a bug.
I thought this would have been corrected by now but the latest PMDG DC6 release notes are telling the problem is still there:
In other words, you might end up moving your FS2020 folders in such a way that the complete path to an add-on file is so long that it exceeds the limit of 260 characters (known as MAX_PATH in Win32 SDK).
When the total file path name exceeds this limit, the file can’t be found nor read by FS2020 anymore because it exceeds the limits of the Virtual File System (VFS) physical file access capabilities.
I’ve read reports of a problem where using a non ASCII character in the user account name is causing FS2020 to fail accessing the files properly, but this is supposed to be transparently handled when using the UCS2 Windows API like CreateFileW (instead of the equivalent ANSI Windows API like CreateFileA).
The standard path to the community folder is something like this:
This is already taking 151 characters out of the 260 available (MAX_PATH) and this doesn’t leave much remaining characters for any sub-folder.
It seems the FS2020 Virtual File System (VFS) is not capable of handling non-ANSI chars correctly when migrating add-ons from different systems configured with different locales and it is not able to access files which file paths are longer than 260 chars.
Both of these are making me wondering whether FS2020 is coded with the correct APIs and whether it is a bug, and I hope this information will help solving this.
Mounting zip AND .7z files would not only solve the long filename problem but would also allow:
Huge savings of hard drive space.
Making it easier to “mod manage” all our add-ons in the community folder.
Huge saving in loading time because instead of issuing thousands of IOCTL, you’re only issuing 1 and you get the full directory and the file bits in one go.
In general, many VFS library are already supporting .zip (and some times others like 7z) natively. It is often a matter of just “enabling” mounting .zip archives in the VFS. If not, it is really not too complex though and .zip fits perfectly the typical VFS approach.
Why 7z though and not just .zip files?
I find it is in practice more efficient to compressing add-ons, most likely due to the efficiency on .DDS texture files.
Many file access functions also have a Unicode versions which permits extended-length path for a maximum total path length of 32,767 characters by using the extended-length path prefix:
This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters).
To specify an extended-length path, use the “\?” prefix.
"\\?\D:\very long path".
This seems to be simple a change to managing paths which I hope will prove helpful. The solution might prove to be as simple as adding the long path prefix in the VFS physical path name handling.