[gnome-software] trivial: Fix newer dates in git snapshot versions



commit be0b65da0f35024ebdf5f45c80123a735ce5b031
Author: Richard Hughes <richard hughsie com>
Date:   Tue May 10 14:25:23 2016 +0100

    trivial: Fix newer dates in git snapshot versions

 src/gs-app.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 27d773b..6ca758e 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -1172,12 +1172,13 @@ gs_app_get_ui_version (const gchar *version, guint64 flags)
 
        /* then remove any git suffix */
        if ((flags & GS_APP_VERSION_FIXUP_GIT_SUFFIX) > 0) {
-               f = g_strrstr_len (new, -1, ".2012");
-               if (f != NULL)
-                       *f= '\0';
-               f = g_strrstr_len (new, -1, ".2013");
-               if (f != NULL)
-                       *f= '\0';
+               for (i = 1999; i < 2020; i++) {
+                       g_autofree gchar *suffix = NULL;
+                       suffix = g_strdup_printf (".%i", i);
+                       f = g_strrstr_len (new, -1, suffix);
+                       if (f != NULL)
+                               *f= '\0';
+               }
        }
 
        return new;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]