fix(mm): issue with deleting single file models

This commit is contained in:
psychedelicious
2025-10-10 18:54:44 +11:00
parent abbc96de7a
commit bab61fbca4

View File

@@ -372,7 +372,7 @@ class ModelInstallService(ModelInstallServiceBase):
if model_path.is_file() or model_path.is_symlink():
model_path.unlink()
assert model_path.parent != self.app_config.models_path
os.rmdir(model_path.parent)
rmtree(model_path.parent)
elif model_path.is_dir():
rmtree(model_path)
self.unregister(key)