-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Handle deletion of unsaved copied file in NotebookPanel (#1557)
* Previously, duplicating a notebook file and then trying to delete it without saving it first will cause an error to occur * Added a `fileExists` function to `FileUtils` to handle this check * Added a `getUniqueCopyFileName` function to `FileUtils` * Behaviour of copying a file from `NotebookPanel` changed from opening an unsaved copy of the file to duplicating the file in `FileStorage` first * Related to #1359 #### Testing Instructions: * Open a file in the notebook panel * Copy the opened file by using the 'Copy File' option in the overflow menu * Delete the file by using the overflow menu (No error should occur) * Repeat the same steps but copy the file by right clicking the file in the file explorer * Delete the copied file again, this time it should also disappear from the file explorer --------- Co-authored-by: georgecwan <[email protected]>
- Loading branch information
1 parent
327bcb6
commit 4021aac
Showing
3 changed files
with
61 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters