commit - 00f36e4705c823c9a2b0c558da9601d8da340d28
commit + 40b289d73058601f96681c0e1048fce46c1751b1
blob - 696ab23bd6d6225884a016c70864988c476f669f
blob + 05c0896c505ce7c7462de2f06c6387e3169eb110
--- lib/fileindex.c
+++ lib/fileindex.c
subdir = opendir(subdirpath);
if (subdir == NULL) {
+ if (errno == EACCES) {
+ *next = TAILQ_NEXT(dle, entry);
+ return NULL;
+ }
err = got_error_from_errno2("opendir", subdirpath);
free(subpath);
free(subdirpath);
blob - b6130cbd359e573de7f6dc6be70e481d25764d33
blob + 1c38979ba097d0b6e400aac0aedaff2eff8228f8
--- lib/worktree.c
+++ lib/worktree.c
ignoresfile = fopen(ignorespath, "r");
if (ignoresfile == NULL) {
- if (errno != ENOENT)
+ if (errno != ENOENT && errno != EACCES)
err = got_error_from_errno2("fopen",
ignorespath);
} else
workdir = opendir(ondisk_path);
if (workdir == NULL) {
- if (errno != ENOTDIR && errno != ENOENT)
+ if (errno != ENOTDIR && errno != ENOENT && errno != EACCES)
err = got_error_from_errno2("opendir", ondisk_path);
else
err = report_single_file_status(path, ondisk_path,
blob - 99766ac88326608f2b27f3b5c8415b095b11073c
blob + 5fde224adeff7a5c44b9167d6ceb971c1493e503
--- regress/cmdline/status.sh
+++ regress/cmdline/status.sh
touch $testroot/wt/beta
echo "new file" > $testroot/wt/new
(cd $testroot/wt && got add new >/dev/null)
+ mkdir -m 0000 $testroot/wt/bar
echo 'M alpha' > $testroot/stdout.expected
echo 'D beta' >> $testroot/stdout.expected
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
+ chmod 700 $testroot/wt/bar
+ rmdir $testroot/wt/bar
test_done "$testroot" "$ret"
}