Fix broken handling of - (stdin) file name on command line

This commit is contained in:
dgelessus 2019-10-16 23:29:20 +02:00
parent f3b3de496e
commit a5fb30e194
2 changed files with 3 additions and 1 deletions

View File

@ -182,6 +182,8 @@ Version 1.4.1 (next version)
* The internal decompressor implementations have been refactored to use streams. * The internal decompressor implementations have been refactored to use streams.
* This allows for incremental decompression of compressed resource data. In practice this has no noticeable effect yet, because the main ``rsrcfork`` API doesn't support incremental reading of resource data. * This allows for incremental decompression of compressed resource data. In practice this has no noticeable effect yet, because the main ``rsrcfork`` API doesn't support incremental reading of resource data.
* Fixed the command line tool always displaying an incorrect error "Cannot specify an explicit fork when reading from stdin" when using ``-`` (stdin) as the input file.
Version 1.4.0 Version 1.4.0
^^^^^^^^^^^^^ ^^^^^^^^^^^^^

View File

@ -423,7 +423,7 @@ def main() -> typing.NoReturn:
ns = parse_args() ns = parse_args()
if ns.file == "-": if ns.file == "-":
if ns.fork is not None: if ns.fork != "auto":
print("Cannot specify an explicit fork when reading from stdin", file=sys.stderr) print("Cannot specify an explicit fork when reading from stdin", file=sys.stderr)
sys.exit(1) sys.exit(1)