summaryrefslogtreecommitdiff
path: root/media-video/walksnail-osd-tool/files/walksnail-osd-tool-0.3.0-version-parse-fix.patch
blob: 768b8141d88ee531058cc61c929b4cc1d9c24a01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/ui/src/util.rs b/ui/src/util.rs
index e59188c..0a778c4 100644
--- a/ui/src/util.rs
+++ b/ui/src/util.rs
@@ -248,7 +248,8 @@ pub mod build_info {
     }
 
     pub fn get_version() -> Build {
-        let version: Option<Version> = option_env!("GIT_VERSION").and_then(|s| Version::parse(s).ok());
+        // remove the preceding 'v' from the version which throws the parse off
+        let version: Option<Version> = option_env!("GIT_VERSION").and_then(|s| Version::parse(&s[1..]).ok());
         let short_hash: Option<&'static str> = option_env!("GIT_COMMIT_HASH");
 
         match (version, short_hash.map(|s| s.to_string())) {