From 10bcdb2eab81b5b9c893faf90f5bd9f396edeb4a Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 28 May 2010 11:08:34 +0100 Subject: Enable File Reader and blob.slice APIs. Notes: - the change to WebCore/html/FileStream.cpp is a cherry pick of http://trac.webkit.org/changeset/60325 - the change to WebCore/platform/posix/FileSystemPOSIX.cpp is a cherry pick of http://trac.webkit.org/changeset/60374 - this needs a corresponding frameworks/base change Change-Id: I05d1496e1e95adf1c6a61c6f07bbf62e9bc92820 --- WebCore/platform/posix/FileSystemPOSIX.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'WebCore/platform/posix') diff --git a/WebCore/platform/posix/FileSystemPOSIX.cpp b/WebCore/platform/posix/FileSystemPOSIX.cpp index b7fcd71..c035310 100644 --- a/WebCore/platform/posix/FileSystemPOSIX.cpp +++ b/WebCore/platform/posix/FileSystemPOSIX.cpp @@ -75,12 +75,17 @@ bool deleteFile(const String& path) PlatformFileHandle openFile(const String& path, FileOpenMode mode) { + CString fsRep = fileSystemRepresentation(path); + + if (fsRep.isNull()) + return invalidPlatformFileHandle; + int platformFlag = 0; if (mode == OpenForRead) platformFlag |= O_RDONLY; else if (mode == OpenForWrite) platformFlag |= (O_WRONLY | O_CREAT | O_TRUNC); - return open(path.utf8().data(), platformFlag, 0666); + return open(fsRep.data(), platformFlag, 0666); } void closeFile(PlatformFileHandle& handle) -- cgit v1.1