Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
/cortex.cppPublic archive

Commit62b74b7

Browse files
ethanovaEthan Garberqnixsynapse
authored
fix bug where for local models, delete only the model passed in, not all local models (#2207)
Co-authored-by: Ethan Garber <ethancgarber@gmail.com>Co-authored-by: Akarshan Biswas <akarshan@menlo.ai>
1 parentaab3586 commit62b74b7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

‎engine/services/model_service.cc‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,13 +500,10 @@ cpp::result<void, std::string> ModelService::DeleteModel(
500500
std::filesystem::remove(yaml_fp);
501501
CTL_INF("Removed:" << yaml_fp.string());
502502
}else {
503-
// Remove yaml files
504-
for (constauto& entry :
505-
std::filesystem::directory_iterator(yaml_fp.parent_path())) {
506-
if (entry.is_regular_file() && (entry.path().extension() ==".yml")) {
507-
std::filesystem::remove(entry);
508-
CTL_INF("Removed:" << entry.path().string());
509-
}
503+
// Is a local model - Remove only this model's yaml file
504+
if (std::filesystem::exists(yaml_fp)) {
505+
std::filesystem::remove(yaml_fp);
506+
CTL_INF("Removed:" << yaml_fp.string());
510507
}
511508
}
512509

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp