update: better package database
This commit is contained in:
@ -55,13 +55,16 @@ bool lm_ctx_remove(lm_ctx_t *ctx, lm_entry_t *entry, lm_ctx_remove_callback_t ca
|
||||
size_t total = 0, current = 0;
|
||||
|
||||
total = lm_database_files_count(ctx->db, entry);
|
||||
pdebug(__func__, "removing %lu files", total);
|
||||
|
||||
while(lm_database_files_next(ctx->db, entry, &path, &hash, &in_keep)){
|
||||
if(in_keep)
|
||||
if(in_keep){
|
||||
pdebug(__func__, "not removing file because it is set as keep: %s", path);
|
||||
goto next;
|
||||
}
|
||||
|
||||
fpath = join_alloc(ctx->root, path);
|
||||
pdebug(__func__, "removing file %s (%s)", fpath, entry->name);
|
||||
pdebug(__func__, "removing file %s (%s)", fpath, hash);
|
||||
|
||||
if(!exists(fpath, NULL)){
|
||||
pdebug(__func__, "found file in database, but its not on the file system: %s", fpath);
|
||||
|
Reference in New Issue
Block a user