Subject: | ptar should allow '-' as an archive_file name (patch included) |
Using '-' as a filename is very handy for using tar in pipes.
contrived example: cat archive.tar | tar -xvf -
This patch achieves that:
$ diff ptar ptar.new
35a36,41
Show quoted text
> if ($file eq '-') {
> use IO::Handle;
> $file = IO::Handle->new();
> $file->fdopen(fileno(STDOUT),"w");
> }
>
39a46,51
Show quoted text> if ($file eq '-') {
> use IO::Handle;
> $file = IO::Handle->new();
> $file->fdopen(fileno(STDIN),"r");
> }
>