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

Disable directory rename #41

Merged
merged 3 commits into from
Feb 4, 2025
Merged

Disable directory rename #41

merged 3 commits into from
Feb 4, 2025

Conversation

DenisaCG
Copy link
Member

@DenisaCG DenisaCG commented Jan 24, 2025

Disable directory rename as S3 has rename disabled for folders and no straight-forward functionality to do so transparently.

The rename logic is still present and entails copying each individual object inside the original folder and then deleting it, but it will not be accessed for directory renames.

image

@DenisaCG DenisaCG added the enhancement New feature or request label Jan 24, 2025
@DenisaCG DenisaCG self-assigned this Jan 24, 2025
@DenisaCG DenisaCG requested a review from afshin January 24, 2025 12:27
@@ -511,6 +513,29 @@ namespace Private {
'.jp-SidePanel .jp-DirListing-content .jp-DirListing-item[data-isDir]',
rank: 10
});

app.commands.addCommand(CommandIDs.rename, {
execute: args => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don't use args and we rely on the widget to do all the work? Sort of funny to have a rename command that doesn't actually do the renaming.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, we don't use args, that's interesting. The command was modeled after the one in jupyterlab: https://github.com/jupyterlab/jupyterlab/blob/68075b17a11258481f5aba68f473788aeaa88650/packages/filebrowser-extension/src/index.ts#L1191-L1207

Copy link
Member

@afshin afshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@DenisaCG
Copy link
Member Author

DenisaCG commented Feb 4, 2025

Thank you for the review @afshin!

@DenisaCG DenisaCG merged commit 61b237c into main Feb 4, 2025
8 checks passed
@DenisaCG DenisaCG deleted the disableRename branch February 4, 2025 16:12
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

Successfully merging this pull request may close these issues.

2 participants