ce->ce_gid != htonl(st->st_gid))
changed |= OWNER_CHANGED;
/* We consider only the owner x bit to be relevant for "mode changes" */
- if (0100 & (ntohs(ce->ce_mode) ^ st->st_mode))
+ if (0100 & (ntohl(ce->ce_mode) ^ st->st_mode))
changed |= MODE_CHANGED;
if (ce->ce_dev != htonl(st->st_dev) ||
ce->ce_ino != htonl(st->st_ino))
int remove_file_from_cache(char *path)
{
int pos = cache_name_pos(path, strlen(path));
- if (pos >= 0)
+ if (pos < 0)
+ pos = -pos-1;
+ while (pos < active_nr && !strcmp(active_cache[pos]->name, path))
remove_entry_at(pos);
return 0;
}