1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Warn on filesystem case mismatch

When a file is opened with a wrong case, it can work on the developer system but break on a user system with a case-sensitive filesystem.

This will display a warning when it happens.

CAVEATS: It will also display the warning if a symlink is in the path.

Adapt warning if the file is a symlink. Avoid warning on symlinks.

Fix memory leak and avoid `lstat` usage.

Avoid exposing real_path when not in TOOLS_ENABLED mode.
This commit is contained in:
Valentin Cocaud
2019-01-09 10:24:23 +01:00
committed by K. S. Ernest (iFire) Lee
parent 87318a2fb7
commit c09731c413
3 changed files with 46 additions and 1 deletions

View File

@@ -51,6 +51,10 @@ class FileAccessUnix : public FileAccess {
void _close();
#if defined(TOOLS_ENABLED)
String get_real_path() const; // Returns the resolved real path for the current open file.
#endif
public:
static CloseNotificationFunc close_notification_func;