[tracker-miners/sam/index-location: 3/21] cli: Add --file argument for backwards compatibility



commit 86cc13e0a3e0061551cefe9e51f7dfccf6e1467f
Author: Sam Thursfield <sam afuera me uk>
Date:   Fri Mar 20 22:25:22 2020 +0100

    cli: Add --file argument for backwards compatibility
    
    It's easy to keep this around, and nice for old documentation
    to keep working where possible.

 src/tracker/tracker-index.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/tracker/tracker-index.c b/src/tracker/tracker-index.c
index fc28deefd..f0ff904fe 100644
--- a/src/tracker/tracker-index.c
+++ b/src/tracker/tracker-index.c
@@ -36,9 +36,13 @@
 #include "tracker-dbus.h"
 #include "tracker-miner-manager.h"
 
+static gboolean file_arg;
 static gchar **filenames;
 
 static GOptionEntry entries[] = {
+       { "file", 'f', 0, G_OPTION_ARG_NONE, &file_arg,
+        N_("Does nothing, provided for compatibility with Tracker 2.0"),
+        NULL },
        { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames,
          N_("FILE"),
          N_("FILE") },
@@ -129,5 +133,9 @@ main (int argc, const char **argv)
                return EXIT_FAILURE;
        }
 
+       if (file_arg) {
+               g_message ("The --file arg is no longer needed.");
+       }
+
        return index_run ();
 }


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