Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit e435d54

Browse files
authored
Merge pull request #1933 from janhq/chore/cherry-pick-dev
chore: cherry-pick: symlinked model deletion shouldn't remove original file
2 parents a57d392 + 5dee826 commit e435d54

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

engine/controllers/models.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@ void Models::ImportModel(
461461
model_config.files.push_back(modelPath);
462462
auto size = std::filesystem::file_size(modelPath);
463463
model_config.size = size;
464+
465+
// set this so that it doesn't nuke the original file on model deletion
466+
model_entry.branch_name = "imported";
464467
}
465468
model_config.model = modelHandle;
466469
model_config.name = modelName.empty() ? model_config.name : modelName;

0 commit comments

Comments
 (0)