mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-19 15:10:47 +00:00
Catch filesystem_error
This commit is contained in:
parent
0e3e567207
commit
43d1ec144c
@ -13,7 +13,9 @@ static void GetFilesInFolderHelper(
|
|||||||
std::queue<std::pair<fs::path, fs::path>> q;
|
std::queue<std::pair<fs::path, fs::path>> q;
|
||||||
q.emplace(fs::path(folder), fs::path(output_prefix));
|
q.emplace(fs::path(folder), fs::path(output_prefix));
|
||||||
while (!q.empty()) {
|
while (!q.empty()) {
|
||||||
for (auto it = fs::directory_iterator(q.front().first); it != fs::directory_iterator(); ++it) {
|
try {
|
||||||
|
for (auto it = fs::directory_iterator(q.front().first);
|
||||||
|
it != fs::directory_iterator(); ++it) {
|
||||||
auto path = it->path();
|
auto path = it->path();
|
||||||
std::string filename = path.filename();
|
std::string filename = path.filename();
|
||||||
if (filename[0] != '.' || filename == ".ccls") {
|
if (filename[0] != '.' || filename == ".ccls") {
|
||||||
@ -29,6 +31,8 @@ static void GetFilesInFolderHelper(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (fs::filesystem_error&) {
|
||||||
|
}
|
||||||
q.pop();
|
q.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user