diff --git a/include/vkcv/File.hpp b/include/vkcv/File.hpp index d3ac44dec36bd08056b73112ab65a74ec38851e6..06f1c48593853147140b2c8c68c675d52c9dfaec 100644 --- a/include/vkcv/File.hpp +++ b/include/vkcv/File.hpp @@ -6,4 +6,6 @@ namespace vkcv { std::filesystem::path generateTemporaryFilePath(); + std::filesystem::path generateTemporaryDirectoryPath(); + } diff --git a/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp b/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp index 353b9ef5c0c37c32a990a6f4661e009bd3981142..0f499500f12e2778d1841f324717f2b66c2a721e 100644 --- a/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp +++ b/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp @@ -35,7 +35,7 @@ namespace vkcv::upscaling { static bool compileFSRShader(vkcv::shader::GLSLCompiler& compiler, const shader::ShaderCompiledFunction& compiled) { - std::filesystem::path directory = generateTemporaryFilePath(); + std::filesystem::path directory = generateTemporaryDirectoryPath(); if (!std::filesystem::create_directory(directory)) { vkcv_log(LogLevel::ERROR, "The directory could not be created (%s)", directory.string().c_str()); diff --git a/src/vkcv/File.cpp b/src/vkcv/File.cpp index f4f07bd4427f211aae5954f9da98bef227c14768..8fc838c35cc30041ce819257dfd85200401b5e29 100644 --- a/src/vkcv/File.cpp +++ b/src/vkcv/File.cpp @@ -45,4 +45,14 @@ namespace vkcv { return tmp / name; } + std::filesystem::path generateTemporaryDirectoryPath() { + std::filesystem::path tmp = generateTemporaryFilePath(); + + if (std::filesystem::is_directory(tmp)) { + return std::filesystem::path(tmp.string() + "W"); // add W for Wambo + } else { + return tmp; + } + } + }