mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-19 00:20:23 -07:00
versionkeeper: create version file if not present (#9829)
This commit is contained in:
parent
a4e6c5d678
commit
8654029f86
@ -26,10 +26,12 @@ CVersionKeeperManager::CVersionKeeperManager() {
|
||||
if (!DATAROOT)
|
||||
return;
|
||||
|
||||
const auto LASTVER = NFsUtils::readFileAsString(*DATAROOT + "/" + VERSION_FILE_NAME);
|
||||
auto LASTVER = NFsUtils::readFileAsString(*DATAROOT + "/" + VERSION_FILE_NAME);
|
||||
|
||||
if (!LASTVER)
|
||||
return;
|
||||
if (!LASTVER) {
|
||||
NFsUtils::writeToFile(*DATAROOT + "/" + VERSION_FILE_NAME, "0.0.0");
|
||||
LASTVER = "0.0.0";
|
||||
}
|
||||
|
||||
if (!isVersionOlderThanRunning(*LASTVER)) {
|
||||
Debug::log(LOG, "CVersionKeeperManager: Read version {} matches or is older than running.", *LASTVER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user