-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
@@ -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 => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Thank you for the review @afshin! |
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.