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

Godot allow to exist folders with the same name - e.g. AAA and aaa on windows #22475

Closed
qarmin opened this issue Sep 27, 2018 · 9 comments · Fixed by #90280
Closed

Godot allow to exist folders with the same name - e.g. AAA and aaa on windows #22475

qarmin opened this issue Sep 27, 2018 · 9 comments · Fixed by #90280

Comments

@qarmin
Copy link
Contributor

qarmin commented Sep 27, 2018

Godot version:
3.1 8fc92ae

OS/device including version:
Windows 10

Issue description and Steps to reproduce:
When I have folder with name AAA I can't create folder with aaa, but when I create script and put it in new folder which have name aaa, godot create it and shouldn't do this.

https://streamable.com/kcjrz

@groud groud added this to the 3.1 milestone Sep 27, 2018
@groud groud assigned groud and unassigned groud Sep 27, 2018
@Piet-G
Copy link
Contributor

Piet-G commented Sep 27, 2018

Wouldn't allowing this break things on other OS's that don't distinguish between capitalization of folders?

@ninao-xyz
Copy link

@dualmatrix I believe that windows is the only OS around that thinks 'file_or_folder_name' and 'FiLe_Or_FoLdEr_NaMe' are the same.

Although NTFS can be configured to be case sensitive, it is turned off by default.

@akien-mga
Copy link
Member

I think that the Script Create Dialog should probably not be allowed to create folders on its own like this based on a manually typed path. There might be other ways to create such folder names with different case on Windows though that need to be handled at the Dir/FileAccess level probably.

@KellyThomas
Copy link
Contributor

KellyThomas commented Sep 28, 2018

Some of the macOS file systems default to a case insensitive mode.

APFS, like HFS+, is case-sensitive on iOS and is available in case-sensitive and case-insensitive variants on macOS, with case-insensitive being the default.

https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html

@elasota
Copy link
Contributor

elasota commented Sep 28, 2018

@akien-mga It actually can't create folders on its own. If the destination directory doesn't exist, then the create script dialog will display an "Invalid path" error. Even if that wasn't the case, partial paths where directories exist should be resolving to FS directories.

@dualtagh
Copy link
Contributor

dualtagh commented Oct 3, 2018

Looks like a UI issue, not a directory creation issue. AAA & aaa are the pointing to the same folder. If you alt-tab away and back again, AAA is gone from FileSystem

@Anutrix
Copy link
Contributor

Anutrix commented Jul 12, 2019

Just Random Info: Case sensitivity on Windows 10 is an NTFS system feature that can be enabled on a per-directory basis. This means that it wouldn't apply to your entire file system. That said, you can only add the feature to specific folders for development purposes. Case sensitivity on Windows 10 was included in the April 2018 Update.

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Jan 8, 2020
@Zylann
Copy link
Contributor

Zylann commented Jun 25, 2021

The link to the video seems dead so basically I can still reproduce this in Godot 3.3.2 on Windows by doing this:

  1. In the project, create a folder named aaa
  2. In the script editor, create a new script
  3. Use Save As.... The dialog starts in res:// on the adress bar. Append AAA so it becomes res://AAA. Observe all files displayed by the dialog disappear.
  4. Click Save: observe the directory was created with the script in it.

Other attempts at explicitely creating the AAA folder are met with a could not create folder popup.

Note: the dialog might not be responsible for this (although I have doubts about what happens in step 3)), but rather the code that reacts to the submission of the dialog.
It also happens if I use the Save As option in the inspector after having created a new resource in it, so it doesnt seem limited to the script editor.

@TheSofox
Copy link
Contributor

TheSofox commented Apr 5, 2024

Different repo steps, but I believe this bug is a duplicate of #76021

I've submitted a PR that fixes that issue, and seems to fix this one too.

@akien-mga akien-mga added this to the 4.3 milestone Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment