Skip to content

Commit

Permalink
[File system operations] Ignore touch file errors during copy or move
Browse files Browse the repository at this point in the history
Copying files to MTP devices generates a FILE_ERROR_SECURITY. Errors
are expected and should be ignored:
https://codereview.chromium.org/24593002

CL:2856297 changed this behavior. Rectify this change of behavior in
SnapshotCopyOrMoveImpl and StreamCopyOrMoveImpl.

Bug: 1214682
Change-Id: I42d876f7fa3bd72479f0c52c71f44c4c81bec73c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2955201
Reviewed-by: Josh Simmons <simmonsjosh@google.com>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Jeremie Boulic <jboulic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#892387}
  • Loading branch information
Jérémie Boulic authored and Chromium LUCI CQ committed Jun 15, 2021
1 parent c85316b commit 13f45c3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class SnapshotCopyOrMoveImpl
// validation.
if (!validator_) {
// No validation is needed.
RunAfterPostWriteValidation(std::move(callback), error);
RunAfterPostWriteValidation(std::move(callback), base::File::FILE_OK);
return;
}

Expand Down Expand Up @@ -634,7 +634,7 @@ class StreamCopyOrMoveImpl

if (error != base::File::FILE_OK ||
operation_type_ == CopyOrMoveOperationDelegate::OPERATION_COPY) {
DidEndCopy(std::move(callback), error);
DidEndCopy(std::move(callback), base::File::FILE_OK);
return;
}

Expand Down

0 comments on commit 13f45c3

Please sign in to comment.