Fix compilation error on Windows

This commit is contained in:
Yousef Khadadeh 2026-02-03 14:31:33 +03:00
parent 842896dc15
commit 93733c225c

View file

@ -341,7 +341,7 @@ void World::autosave_to_directory(const std::filesystem::path& directoryToSaveAt
std::vector<std::string> strList;
for(auto& entry : std::filesystem::directory_iterator(directoryToSaveAt)) {
if(entry.path().has_stem() && entry.path().has_extension() && entry.path().extension() == ("." + FILE_EXTENSION))
strList.emplace_back(entry.path().stem());
strList.emplace_back(entry.path().stem().string());
}
std::string nameToSaveUnder = ensure_string_unique(strList, name);
save_to_file(directoryToSaveAt / std::filesystem::path(nameToSaveUnder + "." + FILE_EXTENSION));