mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed some warnings when calling open() with file mode bits specified but no O_CREAT flag
This commit is contained in:
parent
deed6c4906
commit
e65ac0b2cd
1 changed files with 4 additions and 4 deletions
|
|
@ -415,7 +415,7 @@ int64 juce_fileSetPosition (void* handle, int64 pos)
|
|||
|
||||
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)
|
||||
fileHandle = fdToVoidPointer (f);
|
||||
|
|
@ -452,7 +452,7 @@ void FileOutputStream::openHandle()
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
|
@ -475,7 +475,7 @@ void FileOutputStream::openHandle()
|
|||
}
|
||||
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)
|
||||
fileHandle = fdToVoidPointer (f);
|
||||
|
|
@ -544,7 +544,7 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exc
|
|||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue