mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Fixed assert macros, and improved error handling.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
* License: https://github.com/bkaradzic/bx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#include "bx_p.h"
|
||||
#include <bx/file.h>
|
||||
|
||||
#ifndef BX_CONFIG_CRT_FILE_READER_WRITER
|
||||
@@ -923,7 +922,7 @@ namespace bx
|
||||
Error err;
|
||||
DirectoryReader dr;
|
||||
|
||||
if (!bx::open(&dr, _filePath) )
|
||||
if (!open(&dr, _filePath, &err) )
|
||||
{
|
||||
BX_ERROR_SET(_err, kErrorNotDirectory, "File already exist, and is not directory.");
|
||||
return false;
|
||||
@@ -931,7 +930,7 @@ namespace bx
|
||||
|
||||
while (err.isOk() )
|
||||
{
|
||||
bx::read(&dr, fi, &err);
|
||||
read(&dr, fi, &err);
|
||||
|
||||
if (err.isOk() )
|
||||
{
|
||||
@@ -951,7 +950,7 @@ namespace bx
|
||||
}
|
||||
}
|
||||
|
||||
bx::close(&dr);
|
||||
close(&dr);
|
||||
|
||||
return remove(_filePath, _err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user