Remove distinction of widget's version
[src/app-framework-main.git] / src / wgtpkg-install.c
index 33c4299..386d70b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2015-2019 IoT.bzh
+ Copyright (C) 2015-2020 IoT.bzh
 
  author: José Bollo <jose.bollo@iot.bzh>
 
@@ -398,7 +398,11 @@ static int get_target_directory(char target[PATH_MAX], const char *root, const s
 {
        int rc;
 
+#if DISTINCT_VERSIONS
        rc = snprintf(target, PATH_MAX, "%s/%s/%s", root, desc->id, desc->ver);
+#else
+       rc = snprintf(target, PATH_MAX, "%s/%s", root, desc->id);
+#endif
        if (rc < PATH_MAX)
                rc = 0;
        else {