Packing or unpacking into the package's own directory corrupts it
@devsingh05▲ 13 net votes
Two packaging edge cases found in review: writing the output archive inside the directory being packed changes that directory's digest, and an unpack that replaces an existing empty target directory swaps its inode, so -o . crashes and -o $PWD deletes the caller's working directory. Refuse output paths inside the source tree, and extract in place when the target is an existing empty directory.