From 775eefee7156aa430db37bc02a45423e516f5d94 Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Mon, 24 Jun 2019 10:05:58 -0700 Subject: [PATCH] Allow a Windows path with drive letter to be used as an argument for --datadir --- oscar/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oscar/main.cpp b/oscar/main.cpp index f0db9a7d..d56fc8e4 100644 --- a/oscar/main.cpp +++ b/oscar/main.cpp @@ -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");