From: Mikko Rasa Date: Sat, 6 May 2023 14:32:40 +0000 (+0300) Subject: Don't try to look for Build files in non-directories X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=e9bf66abdc6b71070a4fab5112cfbcf4b0f607a9;p=builder.git Don't try to look for Build files in non-directories My stat implementation on Windows apparently treats this situation as "file not found", so I did not notice it until now. --- diff --git a/source/lib/packagemanager.cpp b/source/lib/packagemanager.cpp index fb9a514..6763aa7 100644 --- a/source/lib/packagemanager.cpp +++ b/source/lib/packagemanager.cpp @@ -193,11 +193,14 @@ FS::Path PackageManager::get_package_location(const string &name) for(const string &f: list_files(p)) { FS::Path full = p/f; - FS::Stat st = FS::stat(full/"Build"); - if(st && st.get_type()!=FS::DIRECTORY) + if(FS::is_dir(full)) { - pkg_dirs.push_back(full); - ++count; + FS::Stat st = FS::stat(full/"Build"); + if(st && st.get_type()!=FS::DIRECTORY) + { + pkg_dirs.push_back(full); + ++count; + } } }