You've already forked godot
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user