[fix] handle relative cache paths during device identity initialization

This commit is contained in:
dijunkun
2026-11-05 16:25:05 +08:00
parent 751cf04434
commit 5e34360d25
+4 -1
View File
@@ -230,7 +230,10 @@ std::string Read(const std::filesystem::path& path) {
}
void EnsureDirectory(const std::filesystem::path& directory, bool protect_existing) {
std::filesystem::create_directories(directory.parent_path());
const auto parent = directory.parent_path();
if (!parent.empty()) {
std::filesystem::create_directories(parent);
}
#ifdef _WIN32
CreatePrivateDirectory(directory, protect_existing);
#else