diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-12 10:28:44 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-12 10:28:44 +0200 |
commit | cc5211214432515bf36af8b01e5eaaea242022a2 (patch) | |
tree | 1588e2925d36a3fa118b5b3915f8ab21b04e0386 /drivers/unix | |
parent | 6b9f4418bb3802992fbf41e52c032d07e02974b4 (diff) | |
parent | da4f5fb953dfeac78093235b0d0828ca944aa0a4 (diff) | |
download | redot-engine-cc5211214432515bf36af8b01e5eaaea242022a2.tar.gz |
Merge pull request #96643 from bruvzg/fs_links
[FileSystem Dock] Add symlink indicator and tooltip.
Diffstat (limited to 'drivers/unix')
-rw-r--r-- | drivers/unix/dir_access_unix.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 489181a025..e4bad88083 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -419,6 +419,9 @@ Error DirAccessUnix::remove(String p_path) { } p_path = fix_path(p_path); + if (p_path.ends_with("/")) { + p_path = p_path.left(-1); + } struct stat flags = {}; if ((stat(p_path.utf8().get_data(), &flags) != 0)) { @@ -438,6 +441,9 @@ bool DirAccessUnix::is_link(String p_file) { } p_file = fix_path(p_file); + if (p_file.ends_with("/")) { + p_file = p_file.left(-1); + } struct stat flags = {}; if ((lstat(p_file.utf8().get_data(), &flags) != 0)) { @@ -453,6 +459,9 @@ String DirAccessUnix::read_link(String p_file) { } p_file = fix_path(p_file); + if (p_file.ends_with("/")) { + p_file = p_file.left(-1); + } char buf[256]; memset(buf, 0, 256); |