Downloads space calculation doesn't account for duplicate entries or externally removed files |
|||||||
Issue descriptionThe space calculation in the Downloads UI doesn't currently account for 1. Duplicate entries e.g. I downloaded the same file 3 times, overwriting each time. Currently the file's size will be triple counted in the space calculation 2. Externally removed files e.g. removed file through Downloads app. We already check for this and alter the display. We should not include the size of externally removed files in the space calculation.
,
Oct 28 2016
Theresa: is this a problem anymore? I think we stopped showing dupes at some point.
,
Oct 31 2016
We still show duplicates; you can no longer create dupes but that doesn't do anything for existing dupes.
,
Dec 2 2016
,
Jan 11 2017
,
May 2 2017
,
May 2 2017
,
May 4 2017
,
May 5 2017
I will fix the size by checking the file paths, but should we just show dupes? History items are to record all user download actions. I think it's legit to have dupes?
,
May 5 2017
By show duplicates, do you mean display them in the UI? If so, we do show duplicates. We should only count each unique filepath in the space display once in the space display, however. Before the download info bar was redone, it was possible to overwrite a file. For example, user downloads an image called image.png. A few days later, user downloads a different image called image.png overwriting the original. The downloads back end will provide two download history entries, but only the most recent entry is actually taking up disk space since the first was overwritten. We currently count the file size twice, once for each entry.
,
May 5 2017
Thanks, makes sense.
,
May 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/26f8a66eafef66b5c9c64d40028a0769291eb0e5 commit 26f8a66eafef66b5c9c64d40028a0769291eb0e5 Author: xingliu <xingliu@chromium.org> Date: Fri May 05 22:37:01 2017 Fix duplicate space calculation on Android download home. Check duplicate file paths when calculate disk space shown in UI. Current Android code doesn't generate duplicate path, but we still need this fix for existing records. I think we shouldn't filter duplicate entries however, since the download history is not the same concept as a list of files on disk. BUG= 639911 Review-Url: https://codereview.chromium.org/2863863002 Cr-Commit-Position: refs/heads/master@{#469781} [modify] https://crrev.com/26f8a66eafef66b5c9c64d40028a0769291eb0e5/chrome/android/java/src/org/chromium/chrome/browser/download/ui/BackendItems.java [modify] https://crrev.com/26f8a66eafef66b5c9c64d40028a0769291eb0e5/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java
,
May 6 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dfalcant...@chromium.org
, Sep 2 2016