[PR #1017] [MERGED] Do not escape the object name in the fs backend #1119

Closed
opened 2026-03-03 12:33:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1017
Author: @gaul
Created: 12/23/2022
Status: Merged
Merged: 12/28/2022
Merged by: @fsouza

Base: mainHead: fs/do-not-escape-object-name


📝 Commits (3)

  • a0e528e Do not escape the object name in the fs backend
  • 89ff764 Use filepath.Rel to derive the object name from the path
  • 654b0a7 internal/backend/fs: fix usage of filepath.Rel

📊 Changes

1 file changed (+29 additions, -16 deletions)

View changed files

📝 internal/backend/fs.go (+29 -16)

📄 Description

Now fake-gcs-server implicitly creates parent directories when creating an object /foo/bar/baz. This allows creating paths longer than NAME_MAX (256) and interoperating with existing filesystems. This approach does not allow some kinds of objects to exist, e.g., /foo/ with a non-zero object size, although these should be rare.


🔄 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/fsouza/fake-gcs-server/pull/1017 **Author:** [@gaul](https://github.com/gaul) **Created:** 12/23/2022 **Status:** ✅ Merged **Merged:** 12/28/2022 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `fs/do-not-escape-object-name` --- ### 📝 Commits (3) - [`a0e528e`](https://github.com/fsouza/fake-gcs-server/commit/a0e528ef89eedbd3dd88304b4655c71e5094f0a9) Do not escape the object name in the fs backend - [`89ff764`](https://github.com/fsouza/fake-gcs-server/commit/89ff764e850f7e7ac8ceab9ead71400cde7af53b) Use filepath.Rel to derive the object name from the path - [`654b0a7`](https://github.com/fsouza/fake-gcs-server/commit/654b0a7c8203a728093112babac7917ff0ffec17) internal/backend/fs: fix usage of filepath.Rel ### 📊 Changes **1 file changed** (+29 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `internal/backend/fs.go` (+29 -16) </details> ### 📄 Description Now fake-gcs-server implicitly creates parent directories when creating an object `/foo/bar/baz`. This allows creating paths longer than `NAME_MAX` (256) and interoperating with existing filesystems. This approach does not allow some kinds of objects to exist, e.g., `/foo/` with a non-zero object size, although these should be rare. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:33:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#1119
No description provided.