Fix POSIX RandomAccessFile

This commit is contained in:
Vinnie Falco
2013-07-17 13:31:01 -07:00
parent 49f70c083d
commit b3b188061a
2 changed files with 13 additions and 10 deletions

View File

@@ -276,6 +276,8 @@ public:
expect (result.wasOk (), "Should be ok");
if (result.wasOk ())
{
HeapBlock <Record> records (numRecords);
createRecords (records, numRecords, maxPayload, seedValue);
@@ -288,6 +290,7 @@ public:
readRecords (file, numRecords, records, seedValue);
}
}
void runTest ()
{

View File

@@ -551,7 +551,7 @@ Result RandomAccessFile::nativeOpen (File const& path, Mode mode)
}
else if (mode == readWrite)
{
const int f = ::open (file.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644);
const int f = ::open (path.getFullPathName().toUTF8(), O_RDWR + O_CREAT, 00644);
if (f != -1)
{