Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Unified Diff: chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.cc

Issue 12051010: (For-try) Divide recursive Copy/Move into multiple async tasks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.cc
diff --git a/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.cc b/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.cc
index 6a5e2c1816a21f88c153a29d4e0845b64590e474..cd1f87792074c92cdc09c64298d5ddedb3cd8ee6 100644
--- a/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.cc
+++ b/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.cc
@@ -133,6 +133,8 @@ PlatformFileError MTPDeviceDelegateImplLinux::CreateSnapshotFile(
PlatformFileError error = GetFileInfo(device_file_path, file_info);
if (error != base::PLATFORM_FILE_OK)
return error;
+ if (file_info->is_directory)
+ return base::PLATFORM_FILE_ERROR_NOT_A_FILE;
if (file_info->size <= 0 || file_info->size > kuint32max)
return base::PLATFORM_FILE_ERROR_FAILED;

Powered by Google App Engine
This is Rietveld 408576698