mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-22 09:06:18 +00:00
fix: use fsync for osx builds
Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
@@ -129,7 +129,11 @@ DownloadStore::write_bencode(const std::string& filename, const torrent::Object&
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
goto download_store_save_error;
|
goto download_store_save_error;
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
fsync(fd);
|
||||||
|
#else
|
||||||
fdatasync(fd);
|
fdatasync(fd);
|
||||||
|
#endif
|
||||||
::close(fd);
|
::close(fd);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user