Allow appending to archives on block devices as well as

archives in regular files, since both are seekable.

Thanks to: Reinoud Zandijk (@netbsd.org)
This commit is contained in:
Tim Kientzle 2008-02-19 05:27:17 +00:00
parent c6446de05d
commit 2372ae680f

View File

@ -1543,7 +1543,7 @@ test_for_append(struct bsdtar *bsdtar)
if (stat(bsdtar->filename, &s) != 0) if (stat(bsdtar->filename, &s) != 0)
return; return;
if (!S_ISREG(s.st_mode)) if (!S_ISREG(s.st_mode) && !S_ISBLK(s.st_mode))
bsdtar_errc(bsdtar, 1, 0, bsdtar_errc(bsdtar, 1, 0,
"Cannot append to %s: not a regular file.", "Cannot append to %s: not a regular file.",
bsdtar->filename); bsdtar->filename);