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