diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-11-07 12:41:11 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-11-07 12:41:11 +0200 |
commit | 8f52d13b8506dff3c53ee3149b990d79e11abeb3 (patch) | |
tree | fbbb2e70ed8f5e8fbc56812042854bc64cee3b16 | |
parent | 7adeb98ef2953c80dc70ecf3cb7ba855a6a44dc1 (diff) | |
download | fpGUI-8f52d13b8506dff3c53ee3149b990d79e11abeb3.tar.xz |
Improves command line parameter handling.
If a INF file or the path to a INF file contained a '-' character, the
file was not opened, because docview thought it was a command line
parameter action (eg: -h or -n etc).
-rw-r--r-- | docview/src/frm_main.pas | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas index 4630ea6f..0089a865 100644 --- a/docview/src/frm_main.pas +++ b/docview/src/frm_main.pas @@ -3396,7 +3396,9 @@ begin begin showtopic := not gCommandLineParams.IsParam('k'); { is the first parameter a known docview help, or some addition parameter } - if Pos(ctiCommandLineParamPrefix, ParamStr(1)) = 0 then + if Pos(ctiCommandLineParamPrefix, ParamStr(1)) = 1 then + // command line parameter order seems wrong, so do nothing + else OpenFile(ParamStr(1), '', showtopic); end; end; |