| @@ -415,7 +415,7 @@ int64 juce_fileSetPosition (void* handle, int64 pos) | |||||
| void FileInputStream::openHandle() | void FileInputStream::openHandle() | ||||
| { | { | ||||
| auto f = open (file.getFullPathName().toUTF8(), O_RDONLY, 00644); | |||||
| auto f = open (file.getFullPathName().toUTF8(), O_CREAT | O_RDONLY, 00644); | |||||
| if (f != -1) | if (f != -1) | ||||
| fileHandle = fdToVoidPointer (f); | fileHandle = fdToVoidPointer (f); | ||||
| @@ -452,7 +452,7 @@ void FileOutputStream::openHandle() | |||||
| { | { | ||||
| if (file.exists()) | if (file.exists()) | ||||
| { | { | ||||
| auto f = open (file.getFullPathName().toUTF8(), O_RDWR, 00644); | |||||
| auto f = open (file.getFullPathName().toUTF8(), O_CREAT | O_RDWR, 00644); | |||||
| if (f != -1) | if (f != -1) | ||||
| { | { | ||||
| @@ -475,7 +475,7 @@ void FileOutputStream::openHandle() | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| auto f = open (file.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644); | |||||
| auto f = open (file.getFullPathName().toUTF8(), O_RDWR | O_CREAT, 00644); | |||||
| if (f != -1) | if (f != -1) | ||||
| fileHandle = fdToVoidPointer (f); | fileHandle = fdToVoidPointer (f); | ||||
| @@ -544,7 +544,7 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exc | |||||
| } | } | ||||
| fileHandle = open (file.getFullPathName().toUTF8(), | fileHandle = open (file.getFullPathName().toUTF8(), | ||||
| mode == readWrite ? (O_CREAT + O_RDWR) : O_RDONLY, 00644); | |||||
| (O_CREAT | (mode == readWrite ? O_RDWR : O_RDONLY)), 00644); | |||||
| if (fileHandle != -1) | if (fileHandle != -1) | ||||
| { | { | ||||