Skip to content

Commit 22b9b76

Browse files
committed
fix: models.cc: symlinked model deletion shouldn't remove original file
1 parent 42a6474 commit 22b9b76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: engine/controllers/models.cc

+3
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)