Feature/path normalization (#1674)

* Path normalization (making sure there are fewer cases of '"..."'
* Using more std::filesystem::path instead of std::string
* Update Ghoul
This commit is contained in:
Alexander Bock
2021-07-01 23:46:22 +02:00
committed by GitHub
parent 20aa307ece
commit 87da9a27ab
56 changed files with 299 additions and 282 deletions
+4 -1
View File
@@ -332,7 +332,10 @@ int createSingleColorImage(lua_State* L) {
const glm::dvec3 color = colorDict.value<glm::dvec3>(key);
std::string fileName = FileSys.cacheManager()->cachedFilename(name + ".ppm", "");
std::filesystem::path fileName = FileSys.cacheManager()->cachedFilename(
name + ".ppm",
""
);
const bool hasCachedFile = std::filesystem::is_regular_file(fileName);
if (hasCachedFile) {
LDEBUGC("OpenSpaceEngine", fmt::format("Cached file '{}' used", fileName));