Index: chrome/browser/chromeos/drive/drive_cache.cc |
diff --git a/chrome/browser/chromeos/drive/drive_cache.cc b/chrome/browser/chromeos/drive/drive_cache.cc |
index e719c2033a81bc61c849a2d92b5954326cf08fa1..489bdf9d27d877d5771146f1d4a12818c4d986b5 100644 |
--- a/chrome/browser/chromeos/drive/drive_cache.cc |
+++ b/chrome/browser/chromeos/drive/drive_cache.cc |
@@ -581,17 +581,15 @@ DriveFileError DriveCache::StoreOnBlockingPool( |
FileOperationType file_operation_type) { |
AssertOnSequencedWorkerPool(); |
+ int64 file_size = 0; |
if (file_operation_type == FILE_OPERATION_COPY) { |
- int64 file_size; |
if (!file_util::GetFileSize(source_path, &file_size)) { |
LOG(WARNING) << "Couldn't get file size for: " << source_path.value(); |
return DRIVE_FILE_ERROR_FAILED; |
} |
- |
- const bool enough_space = FreeDiskSpaceOnBlockingPoolIfNeededFor(file_size); |
- if (!enough_space) |
- return DRIVE_FILE_ERROR_NO_SPACE; |
} |
+ if (!FreeDiskSpaceOnBlockingPoolIfNeededFor(file_size)) |
+ return DRIVE_FILE_ERROR_NO_SPACE; |
base::FilePath symlink_path; |
CacheSubDirectoryType sub_dir_type = CACHE_TYPE_TMP; |