skip os.removeAll() if PID does not exist
This commit is contained in:
parent
fedf71635e
commit
23e899f32d
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,8 @@ func cleanupTmpDirs() {
|
|||
}
|
||||
} else {
|
||||
slog.Debug("failed to open ollama.pid", "path", d, "error", err)
|
||||
// No pid, ignore this tmpdir
|
||||
continue
|
||||
}
|
||||
err = os.RemoveAll(d)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue