bug-fix (files-app) [wip]: Copying, Deleting, Renaming Files #173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Earlier Copying and pasting/Deleting a file would end up copying and pasting or deleting the parent folder rather than the selected file. This was due to not changing the
selected_file
state variable when thefile_options
modal is open,(theselected_file
state variable was only changed when we either open a file or when we open a folder only earlier) the solution that i have proposed, changes the value ofselected_file
whenever thefile_options
modal is opened, when the modal is closed, it goes back to None, rather than persisting the value (earlier code).The Rename option had a small bug too, after renaming a folder it would go back to the parent directory, display entries, this is not how usual process, also it had a bug that, when we rename a file, it would go into that file, misinterrupting it as a folder.
Sorry, I forgot to change git config in my local machine, the user who committed is my account only. Most of the additions and deletions are from code formatter, sorry for that