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

Unified Diff: chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.cc

Issue 11960003: Cleanup: Move more recursive operation logic from FileUtilHelper to FileUtil (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/win/mtp_device_delegate_impl_win.cc
diff --git a/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.cc b/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.cc
index 9b79882d2bcbe53c5a605d2a07f11a7598d0fa00..ba211af9ca7e2f8976d7dd90f821e851da609252 100644
--- a/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.cc
+++ b/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.cc
@@ -167,6 +167,8 @@ base::PlatformFileError MTPDeviceDelegateImplWin::CreateSnapshotFile(
base::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 (!media_transfer_protocol::WriteFileObjectContentToPath(device_.get(),
file_object_id,
local_path))
@@ -237,4 +239,4 @@ string16 MTPDeviceDelegateImplWin::GetFileObjectIdFromPath(
return file_object_id;
}
-} // namespace chrome
+} // namespace chrome
« no previous file with comments | « chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.cc ('k') | webkit/fileapi/file_system_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698