1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 19:40:07 +00:00

Fix cleanup regressions and analyze navigation

Refs #605 #607 #608 #609 #610
This commit is contained in:
Tw93
2026-03-21 13:04:48 +08:00
parent d51e1a621d
commit d6b9d9f3f3
13 changed files with 692 additions and 199 deletions

View File

@@ -559,7 +559,7 @@ declare -a MOLE_TEMP_DIRS=()
# Create tracked temporary file
create_temp_file() {
local temp
temp=$(mktemp) || return 1
temp=$(mktemp "${TMPDIR:-/tmp}/mole.XXXXXX") || return 1
register_temp_file "$temp"
echo "$temp"
}
@@ -567,7 +567,7 @@ create_temp_file() {
# Create tracked temporary directory
create_temp_dir() {
local temp
temp=$(mktemp -d) || return 1
temp=$(mktemp -d "${TMPDIR:-/tmp}/mole.XXXXXX") || return 1
register_temp_dir "$temp"
echo "$temp"
}
@@ -601,7 +601,9 @@ mktemp_file() {
# Cleanup all tracked temp files and directories
cleanup_temp_files() {
stop_inline_spinner || true
if declare -F stop_inline_spinner > /dev/null 2>&1; then
stop_inline_spinner || true
fi
local file
if [[ ${#MOLE_TEMP_FILES[@]} -gt 0 ]]; then
for file in "${MOLE_TEMP_FILES[@]}"; do

View File

@@ -7,6 +7,7 @@ show_clean_help() {
echo ""
echo "Options:"
echo " --dry-run, -n Preview cleanup without making changes"
echo " --external PATH Clean OS metadata from a mounted external volume"
echo " --whitelist Manage protected paths"
echo " --debug Show detailed operation logs"
echo " -h, --help Show this help message"