Index: chrome/browser/chromeos/drive/file_system/update_operation.cc |
diff --git a/chrome/browser/chromeos/drive/file_system/update_operation.cc b/chrome/browser/chromeos/drive/file_system/update_operation.cc |
index b9932c6b41341a21967f76e76c5723c3023bb4dc..6ce958f65faa26f6c540d753ecb54ab3745f2918 100644 |
--- a/chrome/browser/chromeos/drive/file_system/update_operation.cc |
+++ b/chrome/browser/chromeos/drive/file_system/update_operation.cc |
@@ -95,7 +95,9 @@ FileError UpdateFileLocalState( |
if (drive_file_path->empty()) |
return FILE_ERROR_NOT_FOUND; |
- // Clear the dirty bit if we have updated an existing file. |
+ // Do not clear the dirty bit if someone is writing to the file. |
+ if (cache->IsOpenedForWrite(local_id)) |
+ return FILE_ERROR_OK; |
return cache->ClearDirty(local_id, entry.file_specific_info().md5()); |
} |