Bug fix -> String with one char + Directory and File on linux

Former-commit-id: 7f9b6c44197c3cc67145eb0a2d421a2e1de45a84
This commit is contained in:
Gawaboumga
2016-04-04 10:36:13 +02:00
parent 265e1c0fbd
commit 91f2bee487
8 changed files with 60 additions and 459 deletions

View File

@@ -54,11 +54,11 @@ namespace Nz
int flags;
mode_t permissions = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
if (mode & OpenMode_ReadWrite)
if ((mode & OpenMode_ReadWrite) == OpenMode_ReadWrite)
flags = O_CREAT | O_RDWR;
else if (mode & OpenMode_ReadOnly)
else if ((mode & OpenMode_ReadOnly) == OpenMode_ReadOnly)
flags = O_RDONLY;
else if (mode & OpenMode_WriteOnly)
else if ((mode & OpenMode_WriteOnly) == OpenMode_WriteOnly)
flags = O_CREAT | O_WRONLY;
else
return false;