-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Summary
This issue report is the result of a discussion at https://forum.sublimetext.com/t/sublimetext3-cant-delete-folders-from-side-bar-on-windows-very-often
It looks like ST locks the folder of a file it opened on Windows OS. As a result the parent folder can't be moved to the recycle bin via SHShellFileOperation which is used by the send2trash python module. Deleting the folder via Windows Explorer fails, too.
SHShellFileOperation returns error code 120.
DE_ACCESSDENIEDSRC 0x78 Security settings denied access to the source.
Expected behavior
It should be possible to remove all (parent) folders even if a file within them is still open in a view. In many other cases if a file is deleted, the view still contains the content and marks the file modified. Same should happen if one of the parent folders is deleted - no matter which level.
Actual behavior
The following screen capture shows a command prompt script creating the folders and the xml/html files within the hlp folder. If none of the files is opened in a view, the whole folder tree starting with hlp can be deleted successfully.
But as soon as one of the files was open in a view - even for preview only - the folder hlp can't be deleted directly. Neither by sidebar nor by Explorer.
One must delete the folder which contains the open file manually (deu in this example). In worst case this means the whole folder tree needs to be deleted by picking each folder one after another by hand - depending on the previously open files.
Steps to reproduce
- Create a folder tree with at least 3 levels and put some files into the deepest folder (maybe per script)
+ folder 1 + folder 2 + folder 3 - file.xml - Add
folder 1to the sidebar of ST (vanilla install) - Open
file.xml - Close
file.xml - Make sure the indexer is idle
- Try to delete
folder 2-> fails - Now delete
folder 3-> works - Delete
folder 2again -> works
Environment
- Operating system and version:
- Windows 10 Pro 1803 x64
- Monitor:
- Resolution 1900x1200
dpi_scaleused in ST 1.0
- Sublime Text:
- Build 3176
- 64 bit

