Skip to content

Conversation

gave92
Copy link
Member

@gave92 gave92 commented Aug 15, 2020

Fixes #1645

Loading recent files list may cause files to be downloaded from OneDrive.
Trying to read a file with streamReader.Peek(); will trigger the download of the file if such file is in OneDrive and marked "online-only".

That piece of code was added to remove files opened from a disconnected android/MTP phone, so this PR adds a check to only call streamReader.Peek(); if the file was on a MTP phone. This will avoid to risk downloading the file.
This PR also adds handling for a couple more exceptions in PopulateRecentsList() that were seen in crash reports on AppCenter (at this point it might make sense to just catch (Exception) {..

@ghost ghost added the needs - code review label Aug 15, 2020
@yaira2 yaira2 requested a review from tsvietOK August 16, 2020 02:30
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Aug 16, 2020
@yaira2 yaira2 changed the title Do not trigger download from onedrive for elements in the recents list Fixed an issue loading recent items on the home page Aug 16, 2020
@yaira2 yaira2 merged commit 2817842 into files-community:master Aug 16, 2020
@gave92 gave92 deleted the issue_1645 branch August 16, 2020 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recent items & OneDrive Bug
3 participants