New issue
Advanced search Search tips

Issue 619516 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Downloading two files with the same name at the same time clobbers the first (maybe only if the files differ in case on a case-insensitive file system)

Project Member Reported by thakis@chromium.org, Jun 13 2016

Issue description

OS Version: OS X 10.10.5

What steps will reproduce the problem?
1. In one tab, go to https://www.google.com/chrome/browser/beta.html?platform=mac&extra=betachannel and hit download. While the download is still running, go to https://www.google.com/chrome/browser/desktop/index.html?platform=mac and also hit download


What is the expected result?

The two files are saved as "GoogleChrome.dmg" and "googlechrome (2).dmg"


What happens instead of that?

The beta channel goes to GoogleChrome.dmg, but when the stable finishes it goes to googlechrome.dmg and overwrites the beta dmg (!)


This seems like an important, data-loss thing. (most users use a case-insensitive file system since that's the default on windows and mac)

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.22 Safari/537.36



 

Comment 1 by thakis@chromium.org, Jun 13 2016

Or maybe, chrome checks if the target filename already exists at start of download, but since it downloads to a temp file first, this is racy. (And the case-sensitivity of the file system doesn't matter.) I didn't test in detail. Probably easy to see for people familiar with that code what's going on.
Project Member

Comment 2 by sheriffbot@chromium.org, Jun 13 2016

Labels: -M-52 M-53 MovedFrom-52
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 3 by asanka@chromium.org, Jun 13 2016

Cc: -asanka@chromium.org
Owner: asanka@chromium.org
Status: Assigned (was: Untriaged)
The logic we have should take in-progress downloads into account as well as files that are on the disk already. I'll see what happened here.


Project Member

Comment 4 by sheriffbot@chromium.org, Jul 5 2016

Labels: -M-53 -Pri-1 M-54 MovedFrom-53 Pri-2
This issue is Pri-1 but has already been moved once. Lowering the priority and moving to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f4e2aada67ac99063cc7bddf88dddf6ed93e9c0

commit 3f4e2aada67ac99063cc7bddf88dddf6ed93e9c0
Author: asanka <asanka@chromium.org>
Date: Mon Jul 11 19:54:13 2016

[Downloads] Path collision check should be case insensitive.

If there are two on-going downloads with suggested paths that only
differ by case, they should be considered in conflict. Thus the download
that started later should end up with a uniquified path. Otherwise the
files may overwrite each other during the final rename.

R=svaldez@chromium.org
BUG= 619516 

Review-Url: https://codereview.chromium.org/2136673002
Cr-Commit-Position: refs/heads/master@{#404711}

[modify] https://crrev.com/3f4e2aada67ac99063cc7bddf88dddf6ed93e9c0/chrome/browser/download/download_path_reservation_tracker.cc
[modify] https://crrev.com/3f4e2aada67ac99063cc7bddf88dddf6ed93e9c0/chrome/browser/download/download_path_reservation_tracker_unittest.cc

Comment 6 by asanka@chromium.org, Jul 11 2016

Status: Fixed (was: Assigned)

Comment 7 by thakis@chromium.org, Jul 11 2016

Thanks! Do you think we should merge this?

Comment 8 by asanka@chromium.org, Jul 11 2016

Labels: -Pri-2 -M-54 -MovedFrom-52 -MovedFrom-53 M-53 Pri-1
I wasn't going to since the behavior hasn't changed for quite some time. But I think a merge request is reasonable given that this bug could cause data loss.

I'll wait for a Canary cycle and request a merge.

Comment 9 by asanka@chromium.org, Jul 13 2016

Labels: Merge-Request-53
Requesting merge due to possibility of data loss resulting from unexpectedly overwriting downloaded files. The change has baked in Canary without any adverse effects.

Comment 10 by dimu@google.com, Jul 13 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
Status: Started (was: Fixed)
Re-opening for merge.
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 13 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/455b0f4daaac3f4cdeead3145446be08935dc030

commit 455b0f4daaac3f4cdeead3145446be08935dc030
Author: Asanka Herath <asanka@chromium.org>
Date: Wed Jul 13 16:22:43 2016

[Merge M53] [Downloads] Path collision check should be case insensitive.

If there are two on-going downloads with suggested paths that only
differ by case, they should be considered in conflict. Thus the download
that started later should end up with a uniquified path. Otherwise the
files may overwrite each other during the final rename.

R=svaldez@chromium.org
BUG= 619516 

Review-Url: https://codereview.chromium.org/2136673002
Cr-Commit-Position: refs/heads/master@{#404711}
(cherry picked from commit 3f4e2aada67ac99063cc7bddf88dddf6ed93e9c0)

Review URL: https://codereview.chromium.org/2148873002 .

Cr-Commit-Position: refs/branch-heads/2785@{#104}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/455b0f4daaac3f4cdeead3145446be08935dc030/chrome/browser/download/download_path_reservation_tracker.cc
[modify] https://crrev.com/455b0f4daaac3f4cdeead3145446be08935dc030/chrome/browser/download/download_path_reservation_tracker_unittest.cc

Status: Fixed (was: Started)
Labels: TE-Verified-M53 TE-Verified-53.0.2785.21
Verified the issue on Mac 10.11.5 using 53.0.2785.21 and its working fine.Please find the screen cast for the same.Hence added the respective TE-Verified labels.
619516_JUly_19.mp4
1.1 MB View Download
Its working fine on Win 7 using 53.0.2785.21 as well.

Sign in to add a comment