fix complete_filename when directory does not exist
This commit is contained in:
parent
454258a495
commit
d91ac911e7
|
@ -28,6 +28,9 @@ CandidateList complete_filename(const std::string& prefix,
|
|||
auto dir = auto_raii(opendir(dirname.c_str()), closedir);
|
||||
|
||||
CandidateList result;
|
||||
if (not dir)
|
||||
return result;
|
||||
|
||||
while (dirent* entry = readdir(dir))
|
||||
{
|
||||
std::string filename = entry->d_name;
|
||||
|
|
Loading…
Reference in New Issue
Block a user