Make update-cache be explicit about failed open() when doing

add_file_to_cache().
This commit is contained in:
Petr Baudis 2005-04-26 21:04:55 +02:00 committed by Petr Baudis
parent d81ed1b591
commit 071c41a047

View File

@ -73,7 +73,7 @@ static int add_file_to_cache(char *path)
if (allow_remove) if (allow_remove)
return remove_file_from_cache(path); return remove_file_from_cache(path);
} }
return -1; return error("open(\"%s\"): %s", path, strerror(errno));
} }
namelen = strlen(path); namelen = strlen(path);
size = cache_entry_size(namelen); size = cache_entry_size(namelen);