mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +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)
|
||||
goto download_store_save_error;
|
||||
|
||||
#ifdef __APPLE__
|
||||
fsync(fd);
|
||||
#else
|
||||
fdatasync(fd);
|
||||
#endif
|
||||
::close(fd);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user