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

fix: models.cc: symlinked model deletion shouldn't remove original file #1918

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions engine/controllers/models.cc
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ void Models::ImportModel(
model_config.files.push_back(modelPath);
auto size = std::filesystem::file_size(modelPath);
model_config.size = size;

// set this so that it doesn't nuke the original file on model deletion
model_entry.branch_name = "imported";
}
model_config.model = modelHandle;
model_config.name = modelName.empty() ? model_config.name : modelName;
Expand Down
Loading