-
Notifications
You must be signed in to change notification settings - Fork 36
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
Application freezes after deleting files from device #53
Comments
Most likely the problem is not with your library. I tried to do file deletion in C++ and through the library generated by Visual Studio. It still freezes. Maybe you have any idea why this might be happening? |
This library is only a .NET wrapper for the windows MTP COM component. If this component neends a lot of time for the delete the library is waiting. You can try to get a list with all files and use a loop to delete each file with a single call. So you can show a progress bar. |
In fact, that's what I did. But after the first or second removal, the COM object hangs. The freeze time depends on the number of files on the phone. It is even less if you use the generated DLL to access a COM object. But if you delete it through Explorer, then everything is deleted normally. And it most likely uses the same API, since it also hangs up to make an uninstallation from the program. |
After deleting a file the underlying Windows MTP library needs a verly long time to update the cache. |
Library version: 1.8.0.0 (from Nuget, but tried building the latest version from sources too)
Operating system: Windows 7/10
.NET Framework: 4.5
Made the minimum number of operations:
After the last step, the application completely freezes until I unplug the device (tried different phones, the behaviour is the same). Moreover, if I try to open Explorer, it will freeze too. If there are a lot of files, then the program manages to delete some of them.
Because of what it can be and is it possible to fix it somehow?
Thank you!
The text was updated successfully, but these errors were encountered: