Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle paths longer than 260 characters on Windows 10 #52799

Closed
noidexe opened this issue Sep 17, 2021 · 2 comments
Closed

Handle paths longer than 260 characters on Windows 10 #52799

noidexe opened this issue Sep 17, 2021 · 2 comments

Comments

@noidexe
Copy link
Contributor

noidexe commented Sep 17, 2021

Godot version

v3.3.3.stable.official [b973f99]

System information

Windows 10, GLES 3

Issue description

On windows, when the path to project.godot is too long (a folder with a really long name, or too deep of a hierarchy) it seems to load ok but when you try to open a scene it shows all external resources as broken dependencies. Even if the resources are there.
Deleting the import folder and regenerating it doesn't fix the problem.
Moving the project to a shorter path fixes the problem (Is 260 characters still the limit?)

The behavior I would expect is either loading the scene normally or showing the correct error (the path is too long).
The actual error (Broken dependencies) is misleading as they are not really broken.

I'm not sure if it is possible to properly detect the error and show the appropriate warning/message

Steps to reproduce

  • Put any project with at least a scene making use of some files(pngs, ogg, etc) in a really long path. Probably more than 260 characters long. If you try recycle the project folder windows should show a message saying the path is too long for the recycle bin.
  • Open the project in the editor
  • Open any scene making use of some files as resources

Minimal reproduction project

It should be reproducible with any project. It's not the contents of the project but the path to it what triggers the error

@Calinou
Copy link
Member

Calinou commented Sep 17, 2021

Moving the project to a shorter path fixes the problem (Is 260 characters still the limit?)

260 characters is the path length limit on Windows. It can be lifted on Windows 10 with a registry edit – I don't remember the exact steps, but the Python Windows installer will do that for you, for instance. Disabling the path length limit is an opt-in mechanism for legacy compatibility reasons.

If we distribute Windows installers for the Godot editor, we could provide such a tweak too.

If we don't go with the Windows installer route, it may still be possible for a self-contained application to perform this registry tweak. It might be possible to add a menu option that runs a PowerShell command (needed for privilege elevation), and have a specific error dialog that tells you to use the menu option in question (and then restart the editor, or even reboot the PC). The registry tweak in question is system-wide and therefore requires administrator privileges to be applied.

This is also an issue for exported projects, although I presume the issue is much less likely to crop up there.

No matter what we do, we should add a note about this on the Project organization documentation page below the Case sensitivity section.

@Calinou Calinou changed the title Opening a Scene shows missing dependencies error when project path is too long Handle paths longer than 260 characters on Windows 10 Sep 17, 2021
@Calinou Calinou added enhancement and removed bug labels Oct 20, 2021
@akien-mga akien-mga added this to the 4.1 milestone May 12, 2023
@akien-mga
Copy link
Member

Fixed by #76739.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants