From 00add084e218686a65bfad9cce075a54a7f5358d Mon Sep 17 00:00:00 2001 From: abraunegg Date: Sat, 17 Dec 2022 06:52:52 +1100 Subject: [PATCH] Update util.d * Update PR --- src/util.d | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/util.d b/src/util.d index 28814d4c9..3d7967d62 100644 --- a/src/util.d +++ b/src/util.d @@ -439,17 +439,18 @@ void checkApplicationVersion() { releaseGracePeriod.fracSecs = Duration.zero; // roll the grace period forward to allow distributions to catch up based on their release cycles releaseGracePeriod = releaseGracePeriod.add!"months"(1); + + // what is this clients version? + auto currentVersionArray = strip(strip(import("version"), "v")).split("-"); + string applicationVersion = currentVersionArray[0]; // debug output + log.vdebug("applicationVersion: ", applicationVersion); log.vdebug("latestVersion: ", latestVersion); log.vdebug("publishedDate: ", publishedDate); log.vdebug("currentTime: ", currentTime); log.vdebug("releaseGracePeriod: ", releaseGracePeriod); - // what is this clients version? - auto currentVersionArray = strip(strip(import("version"), "v")).split("-"); - string applicationVersion = currentVersionArray[0]; - // display details if not current if (applicationVersion != latestVersion) { // is application version is older than available on GitHub @@ -460,8 +461,8 @@ void checkApplicationVersion() { if (releaseGracePeriod.toUnixTime() > currentTime.toUnixTime()) { writeln(); log.logAndNotify("INFO: A new onedrive client version is available. Please upgrade your client version when possible."); - log.vlog("Current Application Version: ", applicationVersion); - log.vlog("Version Available: ", latestVersion); + log.log("Current Application Version: ", applicationVersion); + log.log("Version Available: ", latestVersion); writeln(); } else { // outside grace period