diff options
Diffstat (limited to 'WebCore/platform/posix/FileSystemPOSIX.cpp')
-rw-r--r-- | WebCore/platform/posix/FileSystemPOSIX.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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) |