diff options
author | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-25 21:19:29 +0000 |
---|---|---|
committer | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-25 21:19:29 +0000 |
commit | 525ea6d7060f2ac5a4f8ad5c94f4d312f16925f6 (patch) | |
tree | 404d7267b2c181aff5cb69a1daaa0f79f315c5ec /webkit/glue/webkit_glue.cc | |
parent | 636cb26c2495b180e8a861df5d94d6b0ac8f32ba (diff) | |
download | chromium_src-525ea6d7060f2ac5a4f8ad5c94f4d312f16925f6.zip chromium_src-525ea6d7060f2ac5a4f8ad5c94f4d312f16925f6.tar.gz chromium_src-525ea6d7060f2ac5a4f8ad5c94f4d312f16925f6.tar.bz2 |
Properly return TYPE_MISMATCH_ERR for DirectoryExists/FileExists
operation when the target isn't a directory/file, respectively.
This matches what the File API spec says about error codes:
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#error-code-descriptions
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6591013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.cc')
-rw-r--r-- | webkit/glue/webkit_glue.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index ce4bf41..227bfe7 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -314,10 +314,11 @@ WebKit::WebFileError PlatformFileErrorToWebFileError( return WebKit::WebFileErrorNotFound; case base::PLATFORM_FILE_ERROR_INVALID_OPERATION: case base::PLATFORM_FILE_ERROR_EXISTS: - case base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY: - case base::PLATFORM_FILE_ERROR_NOT_A_FILE: case base::PLATFORM_FILE_ERROR_NOT_EMPTY: return WebKit::WebFileErrorInvalidModification; + case base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY: + case base::PLATFORM_FILE_ERROR_NOT_A_FILE: + return WebKit::WebFileErrorTypeMismatch; case base::PLATFORM_FILE_ERROR_ACCESS_DENIED: return WebKit::WebFileErrorNoModificationAllowed; case base::PLATFORM_FILE_ERROR_FAILED: |