changeset 212:90ff5dbee152

The HVSC path -H option now requires HVSC root directory, not HVSC/DOCUMENTS directory.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 23 Dec 2018 08:25:21 +0200
parents ddadc2f3302a
children 65bd23eacdca
files sidinfo.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sidinfo.c	Fri Dec 21 14:27:02 2018 +0200
+++ b/sidinfo.c	Sun Dec 23 08:25:21 2018 +0200
@@ -133,7 +133,7 @@
     { 3, 'f', "fields",     "Show only specified field(s)", OPT_ARGREQ },
     { 4, 'x', "hex",        "Use hexadecimal values", OPT_NONE },
     { 7, 'F', "format",     "Use given format string (see below)", OPT_ARGREQ },
-    { 8, 'H', "hvsc",       "Specify path to HVSC documents directory", OPT_ARGREQ },
+    { 8, 'H', "hvsc",       "Specify path to HVSC root directory", OPT_ARGREQ },
     { 9, 'S', "sldb",       "Specify Songlengths.(txt|md5) file (use -H if possible)", OPT_ARGREQ },
     {12, 'R', "recurse",    "Recurse into sub-directories", OPT_NONE },
 };
@@ -1175,7 +1175,10 @@
 char *siCheckHVSCFilePath(const char *filebase, const char *fext)
 {
     th_stat_data sdata;
-    char *npath = th_strdup_printf("%s%c%s%s", setHVSCPath, TH_DIR_SEPARATOR, filebase, fext);
+    char *npath = th_strdup_printf("%s%c%s%c%s%s",
+        setHVSCPath, TH_DIR_SEPARATOR,
+        "DOCUMENTS", TH_DIR_SEPARATOR,
+        filebase, fext);
 
     if (npath != NULL &&
         th_stat_path(npath, &sdata) &&