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:
@@ -704,7 +704,7 @@ cleanup_unused_cache_files() {
|
|||||||
local comfyui_dir="$3"
|
local comfyui_dir="$3"
|
||||||
|
|
||||||
# Find the latest snapshot directory for this repo
|
# 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
|
if [[ ! -d "$repo_cache_dir" ]]; then
|
||||||
print_warning "Cache directory not found for $repo_id"
|
print_warning "Cache directory not found for $repo_id"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user