Browse Source

skip os.removeAll() if PID does not exist

Josh Yan 10 tháng trước cách đây
mục cha
commit
23e899f32d
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      gpu/assets.go

+ 2 - 0
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 {