Bug fix -> String with one char + Directory and File on linux
Former-commit-id: 7f9b6c44197c3cc67145eb0a2d421a2e1de45a84
This commit is contained in:
@@ -49,7 +49,7 @@ namespace Nz
|
||||
return true;
|
||||
else
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
if (errno == EBADF || errno == EOVERFLOW)
|
||||
NazaraError("Unable to get next result: " + Error::GetLastSystemError());
|
||||
|
||||
return false;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -3204,14 +3204,12 @@ namespace Nz
|
||||
EnsureOwnership(true);
|
||||
|
||||
m_sharedString->size = 1;
|
||||
m_sharedString->string[0] = character;
|
||||
m_sharedString->string[1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
auto newString = std::make_shared<SharedString>(1);
|
||||
newString->string[0] = character;
|
||||
}
|
||||
m_sharedString = std::make_shared<SharedString>(1);
|
||||
|
||||
m_sharedString->string[0] = character;
|
||||
}
|
||||
else
|
||||
ReleaseString();
|
||||
|
||||
@@ -474,7 +474,7 @@ namespace Nz
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void RUdpConnection::Uninitialize()
|
||||
void RUdpConnection::Uninitialize()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user