Skip to content

Commit a5fb30e

Browse files
committed
Fix broken handling of - (stdin) file name on command line
1 parent f3b3de4 commit a5fb30e

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ Version 1.4.1 (next version)
182182
* The internal decompressor implementations have been refactored to use streams.
183183
* 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.
184184

185+
* 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.
186+
185187
Version 1.4.0
186188
^^^^^^^^^^^^^
187189

rsrcfork/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def main() -> typing.NoReturn:
423423
ns = parse_args()
424424

425425
if ns.file == "-":
426-
if ns.fork is not None:
426+
if ns.fork != "auto":
427427
print("Cannot specify an explicit fork when reading from stdin", file=sys.stderr)
428428
sys.exit(1)
429429

0 commit comments

Comments
 (0)