Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(863)

Unified Diff: webkit/fileapi/native_file_util.cc

Issue 14079005: Do not return file descriptor if target is a directory in IsolatedFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698