fix: correct bash string substitution for cache directory path

Fix the bash parameter expansion to properly replace all forward slashes
with double hyphens when converting HuggingFace repo IDs to cache paths.

Changed from: ${repo_id//\/--}  (incorrect syntax)
Changed to:   ${repo_id//\//--} (correct syntax)

This fixes the 'Cache directory not found' error when using --cleanup flag.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-25 17:01:05 +01:00
parent bd34036039
commit 0c62e90006

View File

@@ -704,7 +704,7 @@ cleanup_unused_cache_files() {
local comfyui_dir="$3"
# Find the latest snapshot directory for this repo
local repo_cache_dir="${cache_dir}/models--${repo_id//\/--}"
local repo_cache_dir="${cache_dir}/models--${repo_id//\//--}"
if [[ ! -d "$repo_cache_dir" ]]; then
print_warning "Cache directory not found for $repo_id"
return 1