mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Fix POSIX RandomAccessFile
This commit is contained in:
@@ -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 ()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user