| 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
|
|
|