SimonSimCity / Xamarin-CrossDownloadManager

A cross platform download manager for Xamarin
MIT License
149 stars 68 forks source link

[Android] File Not Found when moving from external to internal storage #103

Closed RuddyOne closed 5 years ago

RuddyOne commented 5 years ago

Steps to reproduce

  1. Run project

  2. Create breakpoint in Files.cs on line 42 (in the catch so you can see whats going on)

  3. Accept permission (doesn't seem to make a different)

  4. Click "Download Files"

Expected behavior

All images that are downloaded should be moved to internal storage.

Actual behavior

Most images are moved but some throw an exception "File Not Found". I can see the image is in downloads just like all the others.

Configuration

Platform:

Device:

Demo Project: See the attached. RandomAppTests.zip

RuddyOne commented 5 years ago

So this was something to do with not renaming the temp files before the move? Not sure why that would make the difference but I have now fixed my issue by doing so.

SimonSimCity commented 5 years ago

I doubt this is anything related to my package. Since you've linked this issue to #102, where you describe downloading a stack of 100+ files, I would almost expect the same problem when trying to rename 100+ files - or at least when using the native download manager yourself.

Glad to hear that not moving the file made a possible work-around for you. I'll close this because it's out of my scope. If this is a problem, it's a problem of the underlying code managed by Android.

SimonSimCity commented 5 years ago

It's also slightly related to #24 since we're already dealing with a lot of downloads here ...