cygwin appears to be unique in that it uses fast_abs_path() for
abs_path() and vaguely follows POSIX semantics on directory permissions.
Previously the tempdir created would be chmod() to 0600 (non-executable)
and fast_abs_path() would croak when it couldn't chdir into the
directory.
my ($what, $pathname) = @$_;
test_X_ops($pathname, "for $what $pathname");
+ my $orig_mode = (CORE::stat $pathname)[2];
+
my $mode = 01000;
while ($mode) {
$mode >>= 1;
chmod $mode, $pathname or die "Can't chmod $mode_oct $pathname: $!";
test_X_ops($pathname, "for $what with mode=$mode_oct");
}
- chmod 0600, $pathname
- or die "Can't restore permissions on $pathname to 0600";
+ chmod $orig_mode, $pathname
+ or die "Can't restore permissions on $pathname to ", sprintf("%#o", $orig_mode);
}
SKIP: {