files-community / Files

A modern file manager that helps users organize their files and folders.
https://files.community
MIT License
34.51k stars 2.2k forks source link

Bug: Add a "library in use" dialog when trying to delete them #9444

Open Josh65-2201 opened 2 years ago

Josh65-2201 commented 2 years ago

What's the Problem?

From the discord conversation a user tried to delete a library but it didnt work with no in app reason why.

Relevent error

2022-06-20 18:24:25.3125|WARN|HandleShellLibraryMessage|
    System.IO.FileLoadException: The process cannot access the file because it is being used by another process. (0x80070020)
   at Vanara.PInvoke.Shell32.IShellLibrary.LoadLibraryFromItem(IShellItem library, STGM grfMode)
   at Files.FullTrust.MessageHandlers.LibrariesHandler.<>c__DisplayClass6_0.<HandleShellLibraryMessage>b__2()

Solution/Idea

Add "This libary is in use by " dialog. If its able to get the process using it.

Alternatives

*

Priorities

No response

Files Version

2.3.11.0

Windows Version

10.0.19043.1889

Comments

No response

Josh65-2201 commented 2 years ago

Asking @yaichenbaum for approval.