修复:使用aptss后在/tmp下留下垃圾的问题

Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
shenmo 2025-09-17 12:48:23 +00:00 committed by Gitee
parent 1198e96128
commit 1e5321834d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -79,12 +79,17 @@ cleanup_aptfast()
[ "$CLEANUP_STATE" -eq 0 ] && CLEANUP_STATE=$last_exit_code
cleanup_dllist
_remove_lock
# 添加删除临时目录的逻辑
if [ -n "$LISTTEMP" ] && [ -d "$LISTTEMP" ]; then
rm -rf "$LISTTEMP"
fi
}
exit_cleanup_state()
{
cleanup_aptfast
exit $CLEANUP_STATE
}
LCK_FD=99
# create the lock file and lock it, die on failure
_create_lock()