Skip to content

Commit

Permalink
Don't try to iterate over things that are not directories
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 authored and gfgtdf committed Oct 13, 2014
1 parent eb6302b commit 845c260
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/image.cpp
Expand Up @@ -1149,6 +1149,9 @@ static void precache_file_existence_internal(const std::string& dir, const std::
return;
precached_dirs.insert(checked_dir);

if (!filesystem::is_directory(checked_dir))
return;

std::vector<std::string> files_found;
std::vector<std::string> dirs_found;
filesystem::get_files_in_dir(checked_dir, &files_found, &dirs_found,
Expand Down

0 comments on commit 845c260

Please sign in to comment.