Commit b67e8dfa authored by Sam McNally's avatar Sam McNally Committed by Commit Bot

Stop preserving mtimes on files app copies.

Bug: 523292
Change-Id: I24c947f4d33e779ff5b278d855c262cdea87dc3e
Reviewed-on: https://chromium-review.googlesource.com/c/1347639Reviewed-by: default avatarStuart Langley <slangley@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610302}
parent e08ab349
...@@ -214,7 +214,7 @@ storage::FileSystemOperationRunner::OperationID StartCopyOnIOThread( ...@@ -214,7 +214,7 @@ storage::FileSystemOperationRunner::OperationID StartCopyOnIOThread(
new storage::FileSystemOperationRunner::OperationID; new storage::FileSystemOperationRunner::OperationID;
*operation_id = file_system_context->operation_runner()->Copy( *operation_id = file_system_context->operation_runner()->Copy(
source_url, destination_url, source_url, destination_url,
storage::FileSystemOperation::OPTION_PRESERVE_LAST_MODIFIED, storage::FileSystemOperation::OPTION_NONE,
storage::FileSystemOperation::ERROR_BEHAVIOR_ABORT, storage::FileSystemOperation::ERROR_BEHAVIOR_ABORT,
base::Bind(&OnCopyProgress, profile_id, base::Unretained(operation_id)), base::Bind(&OnCopyProgress, profile_id, base::Unretained(operation_id)),
base::Bind(&OnCopyCompleted, profile_id, base::Owned(operation_id), base::Bind(&OnCopyCompleted, profile_id, base::Owned(operation_id),
......
...@@ -890,6 +890,10 @@ CancelCallback FakeDriveService::CopyResource( ...@@ -890,6 +890,10 @@ CancelCallback FakeDriveService::CopyResource(
if (!last_modified.is_null()) { if (!last_modified.is_null()) {
new_file->set_modified_date(last_modified); new_file->set_modified_date(last_modified);
new_file->set_modified_by_me_date(last_modified); new_file->set_modified_by_me_date(last_modified);
} else {
auto now = base::Time::Now();
new_file->set_modified_date(now);
new_file->set_modified_by_me_date(now);
} }
AddNewChangestamp(new_change, new_file->team_drive_id()); AddNewChangestamp(new_change, new_file->team_drive_id());
......
...@@ -98,6 +98,12 @@ function keyboardCopy(path) { ...@@ -98,6 +98,12 @@ function keyboardCopy(path) {
[['world (1).ogv', '59 KB', 'OGG video']]); [['world (1).ogv', '59 KB', 'OGG video']]);
return remoteCall.waitForFiles( return remoteCall.waitForFiles(
appId, expectedEntryRows, {ignoreLastModifiedTime: true}); appId, expectedEntryRows, {ignoreLastModifiedTime: true});
}).then(() => {
return remoteCall.callRemoteTestUtil(
'getFileList', appId, []);
}).then(function(files) {
// The mtimes should not match.
chrome.test.assertTrue(files[0][3] != files[1][3], files[1][3]);
}); });
} }
......
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