1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 14:55:07 +00:00

LibGUI: Have GFileSystemModel use stat instead of lstat for the root

This allows you to set the GFileSystemModel root to a symlink to a
directory and it nicely opens that directory like you would expect.
This commit is contained in:
Andreas Kling 2020-01-27 22:10:19 +01:00
parent c64904a483
commit f2f0965edd
2 changed files with 10 additions and 7 deletions

View file

@ -88,7 +88,7 @@ public:
GModelIndex index(const GFileSystemModel&, int column) const;
void traverse_if_needed(const GFileSystemModel&);
void reify_if_needed(const GFileSystemModel&);
bool fetch_data_using_lstat(const String& full_path);
bool fetch_data(const String& full_path, bool is_root);
};
static NonnullRefPtr<GFileSystemModel> create(const StringView& root_path = "/", Mode mode = Mode::FilesAndDirectories)