Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep local view of a directory after all files in the directory have been deleted #1055

Open
monthonk opened this issue Oct 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@monthonk
Copy link
Contributor

Tell us more about this new feature.

Today if you delete all files in an implicit directory (directory that is not mapped directly to an object), the directory will disappear after the last file in that directory has been deleted. For example, consider your bucket has the following keys:

colors/blue/image1.jpg
colors/blue/image2.jpg
colors/red/image.jpg
colors/list.txt

The blue directory is an implicit directly as it relies on colors/blue/image1.jpg and colors/blue/image2.jpg to exist. When a user deletes image1.jpg and image2.jpg from Mountpoint the bucket will be left with the following keys:

colors/red/image.jpg
colors/list.txt

This means the next lookup on blue directory will fail with ENOENT.

This behavior does not align with other file systems and could be unexpected for some applications. Mountpoint should keep the local view of the implicit directory unless there is an rmdir call to remove the empty directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant