| Index: base/file_util_proxy.cc
|
| diff --git a/base/file_util_proxy.cc b/base/file_util_proxy.cc
|
| index b3b18f838c4baa6f01562890bde0e4b44ebc14d1..3175fb2520e7e305b5252e8eebfdc2d6221e41e9 100644
|
| --- a/base/file_util_proxy.cc
|
| +++ b/base/file_util_proxy.cc
|
| @@ -136,6 +136,11 @@ class RelayCreateOrOpen : public MessageLoopRelay {
|
| }
|
|
|
| virtual void RunWork() {
|
| + if (!file_util::DirectoryExists(file_path_.DirName())) {
|
| + // If its parent does not exist, should return NOT_FOUND error.
|
| + set_error_code(base::PLATFORM_FILE_ERROR_NOT_FOUND);
|
| + return;
|
| + }
|
| base::PlatformFileError error_code = base::PLATFORM_FILE_OK;
|
| file_handle_ = base::CreatePlatformFile(file_path_, file_flags_,
|
| &created_, &error_code);
|
|
|