[PR #5187] [CLOSED] fix: skip os.removeAll() in assets.go if no PID #11703

Closed
opened 2026-04-12 23:36:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5187
Author: @joshyan1
Created: 6/20/2024
Status: Closed

Base: mainHead: jyan/tmpdir


📝 Commits (4)

  • a240ea3 humanNumbers formats to 3 digits, added trillion case for future
  • e21e6b2 added testcase
  • 5dc5a29 added testcase
  • 00abeac skip remove if no pid

📊 Changes

3 files changed (+29 additions, -17 deletions)

View changed files

📝 format/format.go (+19 -10)
📝 format/format_test.go (+8 -7)
📝 gpu/assets.go (+2 -0)

📄 Description

we accidentally deleted every directory in $TMPDIR that was in the form "ollama*". Used errorcheck with PID to ensure directory is ours before deleting.

Resolves: https://github.com/ollama/ollama/issues/5129


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/5187 **Author:** [@joshyan1](https://github.com/joshyan1) **Created:** 6/20/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `jyan/tmpdir` --- ### 📝 Commits (4) - [`a240ea3`](https://github.com/ollama/ollama/commit/a240ea3367fab5385eaf62f1819054884570cf2e) humanNumbers formats to 3 digits, added trillion case for future - [`e21e6b2`](https://github.com/ollama/ollama/commit/e21e6b2a3389dd57b12f268c005233f7a930af2c) added testcase - [`5dc5a29`](https://github.com/ollama/ollama/commit/5dc5a295bfb93949a8176c15b89eef6e3d0ae82e) added testcase - [`00abeac`](https://github.com/ollama/ollama/commit/00abeaca4e19dc17882722ed38a9c2418de7b85c) skip remove if no pid ### 📊 Changes **3 files changed** (+29 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `format/format.go` (+19 -10) 📝 `format/format_test.go` (+8 -7) 📝 `gpu/assets.go` (+2 -0) </details> ### 📄 Description we accidentally deleted every directory in $TMPDIR that was in the form "ollama*". Used errorcheck with PID to ensure directory is ours before deleting. Resolves: https://github.com/ollama/ollama/issues/5129 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:36:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#11703