Fix passing filenames starting with -

We don't want to pass them as program options.
This commit is contained in:
Přemysl Eric Janouch 2024-01-20 08:31:22 +01:00
parent 9ddeb03652
commit c9662f1a7b
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2017 - 2023, Přemysl Eric Janouch <p@janouch.name> Copyright (c) 2017 - 2024, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted. purpose with or without fee is hereby granted.

View File

@ -1,7 +1,7 @@
// //
// sdn: simple directory navigator // sdn: simple directory navigator
// //
// Copyright (c) 2017 - 2023, Přemysl Eric Janouch <p@janouch.name> // Copyright (c) 2017 - 2024, Přemysl Eric Janouch <p@janouch.name>
// //
// Permission to use, copy, modify, and/or distribute this software for any // Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted. // purpose with or without fee is hereby granted.
@ -917,7 +917,7 @@ fun run_program (initializer_list<const char *> list, const string &filename) {
for (auto program : list) for (auto program : list)
if ((found = program)) if ((found = program))
break; break;
g.ext_helper = found + (" " + shell_escape (filename)); g.ext_helper = found + (" -- " + shell_escape (filename));
g.quitting = true; g.quitting = true;
return; return;
} }