| Index: webkit/fileapi/native_file_util.cc
|
| diff --git a/webkit/fileapi/native_file_util.cc b/webkit/fileapi/native_file_util.cc
|
| index ff82e7726be4293a6e1f82b7ccd9032bb2cebca0..e64fa052ecb8832349bfbec33c7d8631b9f9376c 100644
|
| --- a/webkit/fileapi/native_file_util.cc
|
| +++ b/webkit/fileapi/native_file_util.cc
|
| @@ -85,6 +85,8 @@ PlatformFileError NativeFileUtil::CreateOrOpen(
|
| // If its parent does not exist, should return NOT_FOUND error.
|
| return base::PLATFORM_FILE_ERROR_NOT_FOUND;
|
| }
|
| + if (file_util::DirectoryExists(path))
|
| + return base::PLATFORM_FILE_ERROR_NOT_A_FILE;
|
| PlatformFileError error_code = base::PLATFORM_FILE_OK;
|
| *file_handle = base::CreatePlatformFile(path, file_flags,
|
| created, &error_code);
|
|
|