Merge pull request #1459 from terrelln/destroy

[zstdcli] Refuse to overwrite input file
This commit is contained in:
Nick Terrell
2018-12-18 17:03:54 -08:00
committed by GitHub
2 changed files with 18 additions and 5 deletions
+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"