diff options
author | Timo Teräs <timo.teras@iki.fi> | 2018-01-03 09:31:10 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2018-01-03 09:31:10 +0200 |
commit | b0fcc56f221e749271bb2aa13e151699e62b09ac (patch) | |
tree | c01850bb9ecf3192601c8f4b44d783614a470936 /src/fix.c | |
parent | 8ee79c72b2a6ad5971895bc3a95e633211962107 (diff) | |
download | apk-tools-b0fcc56f221e749271bb2aa13e151699e62b09ac.tar.gz apk-tools-b0fcc56f221e749271bb2aa13e151699e62b09ac.tar.bz2 apk-tools-b0fcc56f221e749271bb2aa13e151699e62b09ac.tar.xz apk-tools-b0fcc56f221e749271bb2aa13e151699e62b09ac.zip |
db: fix triggers to report deleted directories
This change just changes to keep deleted directory items in
the hash with ref count zero and modified flag set. Those entries
are reused when needed. The side effect is that fire_triggers()
will now see those removed direcotries and reports them. Other
enumerators of the directories hash are protected to skip removed
directories when appropriate.
Diffstat (limited to 'src/fix.c')
-rw-r--r-- | src/fix.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -67,6 +67,7 @@ static const struct apk_option_group optgroup_applet = { static int mark_recalculate(apk_hash_item item, void *ctx) { struct apk_db_dir *dir = (struct apk_db_dir *) item; + if (dir->refs == 0) return 0; dir->update_permissions = 1; return 0; } |