Author Topic: Attention MSFS Users - Maximum Path Length Limitation  (Read 1054 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan Martin

  • AIG Modeller
  • Turbine Captain
  • ****
  • Posts: 653
  • FS Addon Designer
    • Jan's Websites
Attention MSFS Users - Maximum Path Length Limitation
« on: January 21, 2021, 03:55:09 PM »
This morning, I (re-)discovered a problem that may affect everything that is inside the MSFS Community folder; scenery files, aircraft model files, texture files, actually everything that is accompanied by a *.json file which registrates the content for use in MSFS.
 
A simple sample for a user of MSFS Microsoft Store version with Community folder at the default location:
 
C:\Users\heini\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Packages\Community\AI Traffic\SimObjects\Airplanes\AIGAIM_AIG_B757-200WL_PW\texture.ABR-ASL Airlines Ireland_PW PCF White opb ASL Airlines Belgium\AIG_B752_PW_L.PNG.DDS
 
This path contains 258 characters and thus exceeds the limit of 255 / 256 characters when long paths are not enabled on the Windows 10 system. The path length into the Community folder already has 108, the folder of the paint 53 characters. The paint cannot be registered successfully in the aircraft.cfg. In some other cases, model and or texture folder had content that cannot be recognized by MSFS since the path name length of the *.json file exceded the character limit.
 
Some scenery designers / modelers / painters use long or even very long file names and or folder names for their contribution to the community. I even found a texture folder containing a comma in the name.
 
Actually, the problem has been known for a while now, but some people - like me until today - may not be fully aware of it and the consequences.
 
The point is: long paths were not enabled on my Windows 10 system by default, I had to dive into the registry to enable the use of long paths:
 
HowToGeek - How to Make Windows 10 Accept File Paths Over 260 Characters
AutoDesk - How to change the default 256 character path limitation (MAX_PATH) in Windows 10

Doing it via Group Policy Editor is not available on Windows 10 Home, btw.
 
I set a recovery point before changing the registry entry and rebooted the computer. After enabling long paths, everything could be installed correctly.

Offline Kaiii3

  • AIG Technic
  • Command Captain
  • *****
  • Posts: 6340
    • Kai's AFD Studio
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #1 on: January 21, 2021, 04:27:56 PM »
new AIM version will add an autocheck for this and a option to enable it.

Offline VAGVAG

  • Senior Captain
  • ******
  • Posts: 913
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #2 on: January 21, 2021, 04:44:33 PM »
So, it is better to install MSFS in another drive. Good thing about MSFS is that you can move your installation without uninstalling and installing again.
My repaints here: https://flyingcarpet75.com/

Offline Kaiii3

  • AIG Technic
  • Command Captain
  • *****
  • Posts: 6340
    • Kai's AFD Studio
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #3 on: January 21, 2021, 04:56:55 PM »
Try to place the Package directory on the first level:

X:\MSFS Packages or even shorter -> X:\MSFS

Offline Jan Martin

  • AIG Modeller
  • Turbine Captain
  • ****
  • Posts: 653
  • FS Addon Designer
    • Jan's Websites
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #4 on: January 23, 2021, 12:14:11 AM »
Just tried to restore a backup I have created on a different drive, copying the backup files back to
C:\Users\heini\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Packages\Community
Windows 10 did not accept copying back some few files and folders, demanding shorter path names for them.
Taking the detour via a ZIP worked even worse.
I checked the registry, long path names were enabled.
 
Please scenery designers / modelers / painters: use short file and folder names!

Thank you for your contribution!

Offline Kaiii3

  • AIG Technic
  • Command Captain
  • *****
  • Posts: 6340
    • Kai's AFD Studio
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #5 on: January 23, 2021, 11:31:37 AM »
tbh: Using this as default "C:\Users\heini\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Packages\Community" is the biggest bullshit MS or ASOBO could have done. I wiuld suggest opening a ticket in their support chat

Offline BruceN

  • AIG Technic
  • Command Captain
  • *****
  • Posts: 2603
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #6 on: January 23, 2021, 11:36:28 PM »
I didn't know it at the time, but now I am happy I chose to install to a D:\MSFS folder. My community path is D:\MSFS2020\Community while all of the program files are in C:\Users\Bruce\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache

I saved quite some path space by doing that when I first installed the sim.

Offline Saturn_29

  • Command Captain
  • *******
  • Posts: 5711
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #7 on: January 28, 2021, 03:19:21 AM »
Is this Maximum Path Length Limitation just for MSFS? I was using AI Manager tonight and it asked me is I wanted to change the path length, but since I use P3D v5.1 I left it the way it was.

Offline Jan Martin

  • AIG Modeller
  • Turbine Captain
  • ****
  • Posts: 653
  • FS Addon Designer
    • Jan's Websites
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #8 on: January 28, 2021, 10:35:07 AM »
I have a 500GB SSD C:\ and a 2TB D:\ plus an external 500GB SSD, which is always connected. All MSFS stuff plus Community folder is on C:\ and there is still plenty of space. The backup is on D:\ and on external drives and clouds. I decided to put all MSFS related files to the C:\ SSD, for a faster sim. Having Community on D:\ or even an external drive may slow down MSFS, though I don't know how big that slow down is, or if there is any slow down at all. Also, using the legacy AI system with its individual model folders and the CVT each to it consumes a lot of drive space, but that will ease with to new glTF format converted models.

Offline Jan Martin

  • AIG Modeller
  • Turbine Captain
  • ****
  • Posts: 653
  • FS Addon Designer
    • Jan's Websites
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #9 on: February 01, 2021, 11:00:09 AM »
Meanwhile, I also cannot use MSFSLayoutGenerator.exe anymore to create a layout.json due to too long pathnames . . .

Offline unc1rlm

  • Command Captain
  • *******
  • Posts: 1328
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #10 on: February 01, 2021, 11:21:31 AM »
These three directories outside my MSFS 2020 which is installed on a separate SSD..what are they? and can they be moved or no? WPSystem;WindowsApps;Program Files-ModifiableWindowsApps...

Thanks,
BobM.

Offline Kaiii3

  • AIG Technic
  • Command Captain
  • *****
  • Posts: 6340
    • Kai's AFD Studio
Re: Attention MSFS Users - Maximum Path Length Limitation
« Reply #11 on: February 01, 2021, 11:39:42 AM »
These three directories outside my MSFS 2020 which is installed on a separate SSD..what are they? and can they be moved or no? WPSystem;WindowsApps;Program Files-ModifiableWindowsApps..

Thanks,
BobM.

do not move them ;) they are part of the process when installing stuff via the Windows Store ::fighting::