[PR #2057] [MERGED] Fixed a bug when end of path for mount point is multi slash #2320

Closed
opened 2026-03-04 02:04:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2057
Author: @ggtakec
Created: 11/19/2022
Status: Merged
Merged: 11/19/2022
Merged by: @ggtakec

Base: masterHead: mp_dir_obj_bug


📝 Commits (1)

  • c4346b9 Fixed a bug when end of path for mount point is multi slash

📊 Changes

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

View changed files

📝 src/s3fs.cpp (+2 -4)

📄 Description

Relevant Issue (if applicable)

#2016

Details

s3fs expects that the last character of the path is not / when the mount point is specified by <bucket name> + <path(ex. /path)>.
If a charactor / terminated path(ex. '/path/') will be specified, it will be excluded during option parsing.
But there was a bug that multiple / terminated path(ex. /path//).
This PR fixed this bug.

  • Impact of this bug
    If /path// and a mount point were specified, the files under the mount point were invisible.
    (Because it searches the path <bucket>/path//)
    Also, although files can be manipulated, a file with a path that s3fs cannot recognize has been created.
    For example, creating a file named sample with this mount point created a file named /path//sample`.

In addition, I think that there were very few cases where the mount point was specified as path//, so I imagine that there is almost no impact on users.


🔄 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/s3fs-fuse/s3fs-fuse/pull/2057 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 11/19/2022 **Status:** ✅ Merged **Merged:** 11/19/2022 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `mp_dir_obj_bug` --- ### 📝 Commits (1) - [`c4346b9`](https://github.com/s3fs-fuse/s3fs-fuse/commit/c4346b94c53b20612474dc862100148057d5793c) Fixed a bug when end of path for mount point is multi slash ### 📊 Changes **1 file changed** (+2 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/s3fs.cpp` (+2 -4) </details> ### 📄 Description ### Relevant Issue (if applicable) #2016 ### Details s3fs expects that the last character of the path is not `/` when the mount point is specified by `<bucket name> + <path(ex. /path)>`. If a charactor `/` terminated path(ex. '/path/') will be specified, it will be excluded during option parsing. But there was a bug that multiple `/` terminated path(ex. `/path//`). This PR fixed this bug. - Impact of this bug If `/path//` and a mount point were specified, the files under the mount point were invisible. (Because it searches the path `<bucket>/path//`) Also, although files can be manipulated, a file with a path that s3fs cannot recognize has been created. For example, creating a file named `sample` with this mount point created a file named /path//sample`. In addition, I think that there were very few cases where the mount point was specified as `path//`, so I imagine that there is almost no impact on users. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:04:55 +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/s3fs-fuse#2320
No description provided.