Merge pull request #1459 from terrelln/destroy

[zstdcli] Refuse to overwrite input file
This commit is contained in:
Nick Terrell authored and GitHub committed 2018-12-18 17:03:54 -08:00
commit 3a4634f2af
2 files changed
+18 -5

No files matched your search

+3
View File
@@ -183,6 +183,9 @@ $ECHO "test: --no-progress flag"
$ZSTD tmpro -c --no-progress | $ZSTD -d -o "$INTOVOID" --no-progress
$ZSTD tmpro -cv --no-progress | $ZSTD -dv -o "$INTOVOID" --no-progress
rm -f tmpro tmpro.zst
$ECHO "test: overwrite input file (must fail)"
$ZSTD tmp -fo tmp && die "zstd overwrote the input file"
$ZSTD tmp.zst -dfo tmp.zst && die "zstd overwrote the input file"
$ECHO "test : file removal"