Skip to content

Commit bd122d6

Browse files
committed
Fix for Save As dialog when opening a file via command line
When the app was started with a font file passed on the command line, it would then be impossible to save any changes to a different name, because the Save As dialog wouldn't open. This was just because we didn't have a full file path, so we now append the current directory to the file name that we're given.
1 parent 1c20a62 commit bd122d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int main(int argc, const char* argv[])
7070
for (int i = 1; i < argc; i++) {
7171
auto arg = std::string{argv[i]};
7272
if (!arg.starts_with("-")) {
73-
start_path = arg;
73+
start_path = std::filesystem::current_path().append(arg);
7474
break;
7575
}
7676
}

0 commit comments

Comments
 (0)