Skip to content
Snippets Groups Projects
Verified Commit 8a46f8d7 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#100] Fixed Windows tmp directory magic

parent 7b62621b
No related branches found
No related tags found
1 merge request!82Resolve "Upscaling Module"
Pipeline #26427 passed
......@@ -6,4 +6,6 @@ namespace vkcv {
std::filesystem::path generateTemporaryFilePath();
std::filesystem::path generateTemporaryDirectoryPath();
}
......@@ -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());
......
......@@ -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;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment