mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-11 21:35:27 -04:00
fix(mkdwarfs_main): only store time resolution if necessary
This commit is contained in:
parent
6448dd0810
commit
53384f6faf
@ -1048,8 +1048,8 @@ int mkdwarfs_main(int argc, sys_char** argv, iolayer const& iol) {
|
||||
if (auto it = time_resolutions.find(time_resolution);
|
||||
it != time_resolutions.end()) {
|
||||
options.metadata.time_resolution_sec = it->second;
|
||||
} else if (auto val = try_to<uint32_t>(time_resolution)) {
|
||||
options.metadata.time_resolution_sec = *val;
|
||||
} else if (auto val = try_to<uint32_t>(time_resolution); val && *val != 1) {
|
||||
options.metadata.time_resolution_sec = val;
|
||||
if (options.metadata.time_resolution_sec == 0) {
|
||||
iol.err << "error: the argument to '--time-resolution' must be nonzero\n";
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user