Add check for if image data folder is empty. This fixes issue #1933

This commit is contained in:
Ylva Selling
2022-03-29 18:03:06 -04:00
parent 7781c7c10d
commit 85f3ac4bd9

View File

@@ -229,7 +229,7 @@ void WwtDataHandler::loadImages(const std::string& root,
const std::filesystem::path& directory)
{
// Collect the wtml files, either by reading from disc or from a url
if (directoryExists(directory)) {
if (directoryExists(directory) && !std::filesystem::is_empty(directory)) {
parseWtmlsFromDisc(_xmls, directory);
LINFO("Loading images from directory");
}