commit f5f1f9c21f2e0723f0a8178f620b7f43724e6b60 from: Stefan Sperling date: Thu Jul 23 14:22:35 2020 UTC handle on-disk file index entry filetypes properly commit - 1e0a3718b1131a9aac753d87c863ef437f73eabc commit + f5f1f9c21f2e0723f0a8178f620b7f43724e6b60 blob - 13820ca28ed7e43a9699728547d5b98015959174 blob + f6dfefff09245b68cc78a7e173e6e4b99c35b095 --- lib/fileindex.c +++ lib/fileindex.c @@ -180,7 +180,7 @@ got_fileindex_entry_stage_set(struct got_fileindex_ent int got_fileindex_entry_filetype_get(struct got_fileindex_entry *ie) { - return (ie->mode & GOT_FILEIDX_MODE_FILE_TYPE); + return (ie->mode & GOT_FILEIDX_MODE_FILE_TYPE_ONDISK); } const struct got_error * @@ -195,7 +195,7 @@ got_fileindex_entry_filetype_set(struct got_fileindex_ return got_error(GOT_ERR_BAD_FILETYPE); } - ie->mode &= ~GOT_FILEIDX_MODE_FILE_TYPE; + ie->mode &= ~GOT_FILEIDX_MODE_FILE_TYPE_ONDISK; ie->mode |= type; return NULL; }