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
Fixed an issue where there was a delay when deleting items #2738
Conversation
Thanks a lot for this. I'm not sure why we check if we are deleting a file from recycle bin that way when we could just check if the file path starts with "X:\$Recycle.Bin".. |
@gave92 - agree. Do you want me to implement this? |
Yes please! (Obvious note: the file path of a recycle bin element can start with any drive letter, not just "C:\") |
The same happens in FilesystemOperations.cs -> you can maybe just change the implementation of |
I prefer to introduce a new helper: as probably we still want to have a function that actively checks if the file is in recycle bin |
Depending on the scope of this PR you might also optimize the call to |
…if the file is there
@gave92 - finally had a lunch time to squeeze a bit of coding 😄 |
@Don-Vito yup I'm didn't mean to remove it, I meant that when you delete a bunch of file that thing is called for every file, while it would be more efficient to call it once at the end. |
I can followup on this 😊 I will try to create an issue later on. |
Files/Filesystem/FilesystemOperations/Helpers/FilesystemHelpers.cs
Outdated
Show resolved
Hide resolved
@Don-Vito for reference: Files Code-Style |
@gave92 - anything I can do to help pushing it forward? 👼 |
@Don-Vito this change looks good to me, I'll approve it as soon as I can test it 👍 |
Fixes #2672
Fixes #2732
There is a significant lag on deletion, especially when numerous files are deleted.
This is significantly impacted by checking whether the file is in Recycle Bin.
This PR somewhat helps by:
(resolves the issue for those who disabled the dialog)
if the item is under recycle bin