Skip to content

Commit 2918cb4

Browse files
committed
filewatcher skip sweeping directories if they don't exist
1 parent 127f583 commit 2918cb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

engine/jleFileIndexer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ jleFileIndexer::sweep(std::vector<jlePath> &erased, std::vector<jlePath> &added,
8787
}
8888

8989
for (auto &dir : _directories) {
90+
if(!std::filesystem::exists(dir))
91+
{
92+
continue;
93+
}
9094
for (auto &file : std::filesystem::recursive_directory_iterator(dir)) {
9195
auto end = file.path().string()[file.path().string().size() - 1];
9296
if (end == '~') {

0 commit comments

Comments
 (0)