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

[Unix] Replace symlink target, not the link itself when using backup save mode.

This commit is contained in:
Pāvels Nadtočajevs
2025-08-07 09:11:09 +03:00
parent 65eb664352
commit 8b4e34cda5
3 changed files with 29 additions and 7 deletions

View File

@@ -1130,8 +1130,8 @@ String OS_Unix::get_user_data_dir(const String &p_user_dir) const {
String OS_Unix::get_executable_path() const {
#ifdef __linux__
//fix for running from a symlink
char buf[256];
memset(buf, 0, 256);
char buf[PATH_MAX];
memset(buf, 0, PATH_MAX);
ssize_t len = readlink("/proc/self/exe", buf, sizeof(buf));
String b;
if (len > 0) {