diff --git a/crnlib/crn_find_files.cpp b/crnlib/crn_find_files.cpp index ce1c770..34c5478 100644 --- a/crnlib/crn_find_files.cpp +++ b/crnlib/crn_find_files.cpp @@ -233,18 +233,14 @@ bool find_files::find_internal(const char* pBasepath, const char* pRelpath, cons } } - if (!known) { - console::error("Cannot detect if the given path is a file or a directory"); - return false; - } + dynamic_string filename(ep->d_name); + dynamic_string fullname = pathname + filename; - if (!is_file && !is_directory) { - console::error("The given path is not a file neither a directory"); - return false; + if (!known || (!is_file && !is_directory)) { + console::warning("Ignoring unsupported path: %s", fullname.get_ptr()); + continue; } - dynamic_string filename(ep->d_name); - if (is_directory) { if (flags & cFlagRecursive) { paths.push_back(filename); @@ -259,7 +255,7 @@ bool find_files::find_internal(const char* pBasepath, const char* pRelpath, cons file.m_base = pBasepath; file.m_rel = pRelpath; file.m_name = filename; - file.m_fullname = pathname + filename; + file.m_fullname = fullname; } } }