1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:15:09 +00:00

HackStudio: Include missing files in the project tree

If some file is in the project but missing on disk, let's still show
it in the project tree (instead of obscuring the fact that a file
is missing.)
This commit is contained in:
Andreas Kling 2020-10-25 13:58:28 +01:00
parent 47a3d81731
commit e6505a95f1

View file

@ -331,12 +331,11 @@ void Project::rebuild_tree()
continue;
}
struct stat st;
if (lstat(path.string().characters(), &st) < 0)
continue;
if (S_ISDIR(st.st_mode)) {
current = &current->find_or_create_subdirectory(part);
continue;
if (lstat(path.string().characters(), &st) == 0) {
if (S_ISDIR(st.st_mode)) {
current = &current->find_or_create_subdirectory(part);
continue;
}
}
auto file_node = adopt(*new ProjectTreeNode);
file_node->name = part;