Commit 23e899f3 authored by Josh Yan's avatar Josh Yan
Browse files

skip os.removeAll() if PID does not exist

parent fedf7163
...@@ -87,6 +87,8 @@ func cleanupTmpDirs() { ...@@ -87,6 +87,8 @@ func cleanupTmpDirs() {
} }
} else { } else {
slog.Debug("failed to open ollama.pid", "path", d, "error", err) slog.Debug("failed to open ollama.pid", "path", d, "error", err)
// No pid, ignore this tmpdir
continue
} }
err = os.RemoveAll(d) err = os.RemoveAll(d)
if err != nil { if err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment