diff options
author | Johannes Schickel | 2007-03-11 14:51:02 +0000 |
---|---|---|
committer | Johannes Schickel | 2007-03-11 14:51:02 +0000 |
commit | b4b3233cb84740638223dd3362515c10a29f1698 (patch) | |
tree | 2fb4ce514c1128b7114f66152233b9f82573407c /backends/platform/symbian/src/SymbianOS.cpp | |
parent | e8c941c1280005d53e97a5b43a266c13ad62ddd4 (diff) | |
download | scummvm-rg350-b4b3233cb84740638223dd3362515c10a29f1698.tar.gz scummvm-rg350-b4b3233cb84740638223dd3362515c10a29f1698.tar.bz2 scummvm-rg350-b4b3233cb84740638223dd3362515c10a29f1698.zip |
Fixed '+' mode handling in symbian_fopen (at least this looks to me like it should be, I'm sorry if I got it wrong).
svn-id: r26088
Diffstat (limited to 'backends/platform/symbian/src/SymbianOS.cpp')
-rw-r--r-- | backends/platform/symbian/src/SymbianOS.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 29fcaa29c4..9c51347c3b 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -411,20 +411,13 @@ FILE* symbian_fopen(const char* name, const char* mode) { fileMode |= EFileStreamText; } - if (modeLen > 1) { - if (mode[1] == '+') - fileMode = fileMode| EFileWrite; - } - - if (modeLen > 2) { - if (mode[1] == '+') - fileMode = fileMode| EFileWrite; + if ((modeLen > 1 && mode[1] == '+') || (modeLen > 2 && mode[2] == '+')) { + fileMode = fileMode| EFileWrite; } switch(mode[0]) { case 'a': - if (fileEntry->iFileHandle.Open(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) - { + if (fileEntry->iFileHandle.Open(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) { if (fileEntry->iFileHandle.Create(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) { delete fileEntry; fileEntry = NULL; |