quantize : make output filename optional again (#2823)

* quantize : make output filename optional again

* quantize : fix path parsing on Windows

suggested by @slaren
This commit is contained in:
Cebtenzzre 2023-08-28 02:32:25 -04:00 committed by GitHub
parent 3e8ff47af6
commit ebcee207b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ int main(int argc, char ** argv) {
}
}
if (argc - arg_idx < 3) {
if (argc - arg_idx < 2) {
usage(argv[0]);
}
@ -114,7 +114,7 @@ int main(int argc, char ** argv) {
std::string ftype_str;
if (try_parse_ftype(argv[arg_idx], params.ftype, ftype_str)) {
std::string fpath;
const size_t pos = fname_inp.find_last_of('/');
const size_t pos = fname_inp.find_last_of("/\\");
if (pos != std::string::npos) {
fpath = fname_inp.substr(0, pos + 1);
}