Fix POSIX RandomAccessFile

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

View File

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

View File

@@ -551,7 +551,7 @@ Result RandomAccessFile::nativeOpen (File const& path, Mode mode)
} }
else if (mode == readWrite) 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) if (f != -1)
{ {