Allow a Windows path with drive letter to be used as an argument for --datadir

This commit is contained in:
Seeker4 2019-06-24 10:05:58 -07:00
parent 641ebbde54
commit 775eefee71

View File

@ -307,7 +307,9 @@ int main(int argc, char *argv[]) {
QString datadir ;
if ((i+1) < args.size()) {
datadir = args[++i];
settings.setValue("Settings/AppData", homeDocs+datadir);
if (datadir.length() < 2 || datadir.at(1) != ":") // Allow a Windows driver letter (but not UNC)
datadir = homeDocs+datadir;
settings.setValue("Settings/AppData", datadir);
// force_data_dir = true;
} else {
fprintf(stderr, "Missing argument to --datadir\n");