mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
make futimes crossplatform
This commit is contained in:
parent
9e8b309a90
commit
49474f01ca
5 changed files with 111 additions and 4 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include "fs_attr.hpp"
|
||||
#include "fs_fallocate.hpp"
|
||||
#include "fs_sendfile.hpp"
|
||||
#include "fs_time.hpp"
|
||||
#include "fs_xattr.hpp"
|
||||
|
||||
using std::string;
|
||||
|
|
@ -168,10 +169,7 @@ namespace fs
|
|||
if(rv == -1)
|
||||
return -1;
|
||||
|
||||
struct timespec times[2];
|
||||
times[0] = stin.st_atim;
|
||||
times[1] = stin.st_mtim;
|
||||
rv = ::futimens(fdout,times);
|
||||
rv = fs::utimes(fdout,stin);
|
||||
if(rv == -1)
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue