Commit dd9e8769 authored by grv@chromium.org's avatar grv@chromium.org

Windows fix for exportSyncfsFolderToLocalFs API.

DeleteFile may return false is the file to be deleted does not exist
on windows. Don't abort export syncfs folder operation if delete
file fails.

BUG=

Review URL: https://chromiumcodereview.appspot.com/19828006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213322 0039d316-1c4b-4281-b951-d872f2087c98
parent 0c6e4764
...@@ -920,15 +920,9 @@ bool DeveloperPrivateExportSyncfsFolderToLocalfsFunction::RunImpl() { ...@@ -920,15 +920,9 @@ bool DeveloperPrivateExportSyncfsFolderToLocalfsFunction::RunImpl() {
void DeveloperPrivateExportSyncfsFolderToLocalfsFunction:: void DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
ClearPrexistingDirectoryContent(const base::FilePath& project_path) { ClearPrexistingDirectoryContent(const base::FilePath& project_path) {
if (!base::DeleteFile(project_path, true/*recursive*/)) {
SetError("Error in copying files from sync filesystem."); // Clear the project directory before copying new files.
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, base::DeleteFile(project_path, true/*recursive*/);
base::Bind(&DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
SendResponse,
this,
false));
return;
}
pendingCopyOperationsCount_ = 1; pendingCopyOperationsCount_ = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment