[PR #771] [MERGED] feat(storage): ensure storage directory exists and handle paths correctly #9704

Closed
opened 2026-02-16 18:14:01 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/771
Author: @necaris
Created: 7/8/2025
Status: Merged
Merged: 7/8/2025
Merged by: @adamdotdevin

Base: devHead: feature/storage-creation


📝 Commits (1)

  • 4f4a1d6 feat(storage): ensure storage directory exists and handle paths correctly

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 packages/opencode/src/storage/storage.ts (+2 -1)

📄 Description

This pull request ensures that the 'storage' directory is created if it doesn't exist before any write operations are made. This prevents potential race conditions and errors on the first run. It also uses path.normalize to ensure robust cross-platform path handling.

I can't figure out how to retrieve the HTTP Error between the TUI and the server, but this should solve the error raised when that storage directory does not exist.


🔄 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/anomalyco/opencode/pull/771 **Author:** [@necaris](https://github.com/necaris) **Created:** 7/8/2025 **Status:** ✅ Merged **Merged:** 7/8/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `feature/storage-creation` --- ### 📝 Commits (1) - [`4f4a1d6`](https://github.com/anomalyco/opencode/commit/4f4a1d678a5f3e525570cc3487862d1144c5b02b) feat(storage): ensure storage directory exists and handle paths correctly ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/storage/storage.ts` (+2 -1) </details> ### 📄 Description This pull request ensures that the 'storage' directory is created if it doesn't exist before any write operations are made. This prevents potential race conditions and errors on the first run. It also uses path.normalize to ensure robust cross-platform path handling. I can't figure out how to retrieve the HTTP Error between the TUI and the server, but this should solve the error raised when that storage directory does not exist. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:01 -05:00
yindo closed this issue 2026-02-16 18:14:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9704