Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
b8421dce
Unverified
Commit
b8421dce
authored
Jul 21, 2023
by
Patrick Devine
Committed by
GitHub
Jul 21, 2023
Browse files
get the proper path for blobs to delete (#168)
parent
9f6e9786
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
server/images.go
server/images.go
+6
-2
No files found.
server/images.go
View file @
b8421dce
...
...
@@ -548,9 +548,13 @@ func DeleteModel(name string, fn func(api.ProgressResponse)) error {
// only delete the files which are still in the deleteMap
for
k
,
v
:=
range
deleteMap
{
if
v
{
err
:=
os
.
Remove
(
k
)
fp
,
err
:=
GetBlobsPath
(
k
)
if
err
!=
nil
{
log
.
Printf
(
"couldn't remove file '%s': %v"
,
k
,
err
)
log
.
Printf
(
"couldn't get file path for '%s': %v"
,
k
,
err
)
continue
}
if
err
:=
os
.
Remove
(
fp
);
err
!=
nil
{
log
.
Printf
(
"couldn't remove file '%s': %v"
,
fp
,
err
)
continue
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment