Commit Diff


commit - af358f55386cfa2314813941ea81d531795792b0
commit + aa9ad2764a70adc7378ea2b701d08f9dd7c8dd7d
blob - 55184665f7b445e704a80de758c82371bc3a475b
blob + 1e59fdb908a5087e2dbdb5ce930a9743a9eead43
--- lib/fileindex.c
+++ lib/fileindex.c
@@ -95,6 +95,7 @@ got_fileindex_entry_update(struct got_fileindex_entry 
 		if (!((ie->flags & GOT_FILEIDX_F_NO_FILE_ON_DISK) &&
 		    errno == ENOENT))
 			return got_error_from_errno2("lstat", ondisk_path);
+		sb.st_mode = GOT_DEFAULT_FILE_MODE;
 	} else {
 		if (sb.st_mode & S_IFDIR)
 			return got_error_set_errno(EISDIR, ondisk_path);