You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-30 18:30:54 +00:00
Merge pull request #113575 from bruvzg/fix_path
[Unix] Remove leading `..` from absolute paths and apply `simplify_path` to Unix current directory path.
This commit is contained in:
@@ -52,6 +52,10 @@
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
|
||||
String DirAccessUnix::fix_path(const String &p_path) const {
|
||||
return DirAccess::fix_path(p_path).simplify_path();
|
||||
}
|
||||
|
||||
Error DirAccessUnix::list_dir_begin() {
|
||||
list_dir_end(); //close any previous dir opening!
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ protected:
|
||||
String current_dir;
|
||||
virtual String fix_unicode_name(const char *p_name) const { return String::utf8(p_name); }
|
||||
virtual bool is_hidden(const String &p_name);
|
||||
virtual String fix_path(const String &p_path) const override;
|
||||
|
||||
public:
|
||||
typedef void (*RemoveNotificationFunc)(const String &p_file);
|
||||
|
||||
Reference in New Issue
Block a user