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

FileManager: Use stat() when activating a file/directory

This makes it possible to open symlinks to directories by activating
them (via double click, for example.) :^)

Fixes #21.
This commit is contained in:
Andreas Kling 2020-01-27 22:11:26 +01:00
parent f2f0965edd
commit fcb7f6f233
2 changed files with 12 additions and 3 deletions

View file

@ -140,7 +140,7 @@ int main(int argc, char** argv)
struct stat st;
// If the directory no longer exists, we find a parent that does.
while (lstat(current_path.characters(), &st) != 0) {
while (stat(current_path.characters(), &st) != 0) {
directory_view->open_parent_directory();
current_path = directory_view->path();
if (current_path == directories_model->root_path()) {