mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 23:30:04 +01:00
Merge 0f2d34a3d5 into 6175ecd4c4
This commit is contained in:
commit
026bbbbfe9
1 changed files with 10 additions and 12 deletions
|
|
@ -200,22 +200,20 @@ CCompositor::CCompositor(bool onlyConfig) : m_onlyConfigVerification(onlyConfig)
|
||||||
|
|
||||||
setenv("HYPRLAND_INSTANCE_SIGNATURE", m_instanceSignature.c_str(), true);
|
setenv("HYPRLAND_INSTANCE_SIGNATURE", m_instanceSignature.c_str(), true);
|
||||||
|
|
||||||
if (!std::filesystem::exists(m_hyprTempDataRoot))
|
std::error_code ec;
|
||||||
mkdir(m_hyprTempDataRoot.c_str(), S_IRWXU);
|
std::filesystem::create_directories(m_hyprTempDataRoot, ec);
|
||||||
else if (!std::filesystem::is_directory(m_hyprTempDataRoot)) {
|
if (ec) {
|
||||||
std::println("Bailing out, {} is not a directory", m_hyprTempDataRoot);
|
std::println("Bailing out, could not create or access {} : {}", m_hyprTempDataRoot, ec.message());
|
||||||
throw std::runtime_error("CCompositor() failed");
|
throw std::runtime_error("CCompositor() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_instancePath = m_hyprTempDataRoot + "/" + m_instanceSignature;
|
m_instancePath = (std::filesystem::path(m_hyprTempDataRoot) / m_instanceSignature).string();
|
||||||
|
if (!std::filesystem::create_directory(m_instancePath, ec)) {
|
||||||
if (std::filesystem::exists(m_instancePath)) {
|
if (ec) {
|
||||||
|
std::println("Bailing out, couldn't create {} : {}", m_instancePath, ec.message());
|
||||||
|
} else
|
||||||
std::println("Bailing out, {} exists??", m_instancePath);
|
std::println("Bailing out, {} exists??", m_instancePath);
|
||||||
throw std::runtime_error("CCompositor() failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mkdir(m_instancePath.c_str(), S_IRWXU) < 0) {
|
|
||||||
std::println("Bailing out, couldn't create {}", m_instancePath);
|
|
||||||
throw std::runtime_error("CCompositor() failed");
|
throw std::runtime_error("CCompositor() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue