(void)clear_nochange_fflags(a);
if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) &&
- S_ISREG(a->st.st_mode)) {
+ S_ISREG(a->mode)) {
/* Use a temporary file to extract */
if ((a->fd = la_mktemp(a)) == -1) {
archive_set_error(&a->archive, errno,
assertMakeFile("d", 0644, "c");
assertMakeFile("fs", 0644, "d");
assertMakeFile("ds", 0644, "e");
+ assertMakeDir("fd", 0755);
assertEqualInt(0, chdir(".."));
/* Tar files up */
assertEqualInt(0,
- systemf("%s -c -C in -f t.tar f fh d fs ds "
+ systemf("%s -c -C in -f t.tar f fh d fs ds fd "
">pack.out 2>pack.err", testprog));
/* Verify that nothing went to stdout or stderr. */
assertEqualInt(0, chdir("out"));
assertMakeFile("f", 0644, "a");
assertMakeHardlink("fh", "f");
+ assertMakeFile("fd", 0644, "b");
assertMakeDir("d", 0755);
if (canSymlink()) {
assertMakeSymlink("fs", "f", 0);
assertTextFileContents("c","d");
assertTextFileContents("d","fs");
assertTextFileContents("e","ds");
+ assertIsDir("fd", 0755);
}