]> git.treefish.org Git - usetaglib.git/commitdiff
Show help if no files given.
authorAlexander Schmidt <alex@treefish.org>
Fri, 6 Feb 2015 13:34:26 +0000 (14:34 +0100)
committerAlexander Schmidt <alex@treefish.org>
Fri, 6 Feb 2015 13:34:26 +0000 (14:34 +0100)
usetaglib.cpp

index b175b2dba3019597440459d499a21ea4a85372ba..439e9a17abc3540586bece33740223376092a275 100644 (file)
@@ -196,9 +196,14 @@ int main(int argc, char *argv[])
         }
     }
 
+  if ( optind == argc ) {
+    printHelp();
+    return 0;
+  }
+  
   if (requestedActions.size() == 0)
     requestedActions.push_back( make_pair(LIST, "") );
-  
+        
   for(int i = optind; i < argc; i++) {
     cout << "******************** \"" << argv[i] << "\" ********************" << endl;
     TagLib::FileRef f(argv[i]);