From: Mikko Rasa Date: Mon, 24 Apr 2023 04:12:24 +0000 (-0700) Subject: While looking for source packages, ignore Build files which are not files X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=b16982f292436789ed3cae445802cba4392ad502;p=builder.git While looking for source packages, ignore Build files which are not files Non-builder packages might contain directories by that name. --- diff --git a/source/lib/packagemanager.cpp b/source/lib/packagemanager.cpp index 7bf5468..907bb46 100644 --- a/source/lib/packagemanager.cpp +++ b/source/lib/packagemanager.cpp @@ -191,7 +191,8 @@ FS::Path PackageManager::get_package_location(const string &name) for(const string &f: list_files(p)) { FS::Path full = p/f; - if(FS::exists(full/"Build")) + FS::Stat st = FS::stat(full/"Build"); + if(st && st.get_type()!=FS::DIRECTORY) { pkg_dirs.push_back(full); ++count;