ismindex: Avoid writing ismf files if no base name has been specified
authorMartin Storsjö <martin@martin.st>
Fri, 5 Sep 2014 19:50:24 +0000 (22:50 +0300)
committerMartin Storsjö <martin@martin.st>
Sun, 7 Sep 2014 20:20:30 +0000 (23:20 +0300)
Previously, this could create files named "(null).ismf", if the -ismf
parameter is specified (before an input file name), but without
specifying any base name.

Signed-off-by: Martin Storsjö <martin@martin.st>
tools/ismindex.c

index bc98226..aa862f8 100644 (file)
@@ -679,6 +679,8 @@ int main(int argc, char **argv)
         } else if (argv[i][0] == '-') {
             return usage(argv[0], 1);
         } else {
+            if (!basename)
+                ismf = 0;
             if (handle_file(&tracks, argv[i], split, ismf,
                             basename, output_prefix))
                 return 1;