From 23e899f32d9f7b3bbe0b902a95c23be5a1254409 Mon Sep 17 00:00:00 2001 From: Josh Yan Date: Thu, 20 Jun 2024 08:51:35 -0700 Subject: [PATCH] skip os.removeAll() if PID does not exist --- gpu/assets.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpu/assets.go b/gpu/assets.go index f2adcf3e..fdb3dd81 100644 --- a/gpu/assets.go +++ b/gpu/assets.go @@ -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 {