API: save to temp file first and then rename it
This commit is contained in:
@@ -46,9 +46,8 @@ private:
|
||||
static void on_dump_to_file(uv_async_t* async) { reinterpret_cast<p2pool_api*>(async->data)->dump_to_file(); }
|
||||
|
||||
struct DumpFileWork {
|
||||
uv_fs_t open_req;
|
||||
uv_fs_t write_req;
|
||||
uv_fs_t close_req;
|
||||
uv_fs_t req;
|
||||
int fd;
|
||||
|
||||
std::string name;
|
||||
std::vector<char> buf;
|
||||
@@ -77,6 +76,7 @@ private:
|
||||
static void on_fs_open(uv_fs_t* req);
|
||||
static void on_fs_write(uv_fs_t* req);
|
||||
static void on_fs_close(uv_fs_t* req);
|
||||
static void on_fs_rename(uv_fs_t* req);
|
||||
|
||||
std::string m_apiPath;
|
||||
std::string m_networkPath;
|
||||
|
||||
Reference in New Issue
Block a user