diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-07-07 13:12:10 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-07-07 13:12:10 +0200 |
| commit | 30dfb151091962231a228a084fb5954b1a75574b (patch) | |
| tree | 8e99ab11cbb7ceccdb7e5ced58b8a0d7e56f07a4 | |
| parent | 7755ad37d030e46ce9a0dcb35e886139fe51137e (diff) | |
Re-fix incorrect ArgFixer.v2.16.88
It needs to be in the front-end, not the kdm_cli() method, otherwise the
tests break.
| -rw-r--r-- | src/lib/kdm_cli.cc | 6 | ||||
| -rw-r--r-- | src/tools/dcpomatic_kdm_cli.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc index ee9622255..bba8fb7c0 100644 --- a/src/lib/kdm_cli.cc +++ b/src/lib/kdm_cli.cc @@ -459,8 +459,6 @@ optional<string> kdm_cli (int argc, char* argv[], std::function<void (string)> out) try { - ArgFixer fixer(argc, argv); - boost::filesystem::path output = dcp::filesystem::current_path(); auto container_name_format = Config::instance()->kdm_container_name_format(); auto filename_format = Config::instance()->kdm_filename_format(); @@ -515,7 +513,7 @@ try { 0, 0, 0, 0 } }; - int c = getopt_long(fixer.argc(), fixer.argv(), "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:BDE:G", long_options, &option_index); + int c = getopt_long(argc, argv, "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:BDE:G", long_options, &option_index); if (c == -1) { break; @@ -649,7 +647,7 @@ try throw KDMCLIError ("you must specify --valid-from"); } - if (optind >= fixer.argc()) { + if (optind >= argc) { throw KDMCLIError ("no film, CPL ID or DKDM specified"); } diff --git a/src/tools/dcpomatic_kdm_cli.cc b/src/tools/dcpomatic_kdm_cli.cc index c30fe4e6a..4ffd0acd7 100644 --- a/src/tools/dcpomatic_kdm_cli.cc +++ b/src/tools/dcpomatic_kdm_cli.cc @@ -33,10 +33,12 @@ int main (int argc, char* argv[]) { + ArgFixer fixer(argc, argv); + dcpomatic_setup_path_encoding (); dcpomatic_setup (); - auto error = kdm_cli(argc, argv, [](std::string s) { std::cout << s << "\n"; }); + auto error = kdm_cli(fixer.argc(), fixer.argv(), [](std::string s) { std::cout << s << "\n"; }); if (error) { std::cerr << *error << "\n"; exit (EXIT_FAILURE); |
