mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
fix fs::copy_file on linux
This commit is contained in:
parent
fb62c297fa
commit
44371dedd9
1 changed files with 1 additions and 1 deletions
|
@ -737,7 +737,7 @@ bool fs::copy_file(const std::string& from, const std::string& to, bool overwrit
|
||||||
// sendfile will work with non-socket output (i.e. regular file) on Linux 2.6.33+
|
// sendfile will work with non-socket output (i.e. regular file) on Linux 2.6.33+
|
||||||
off_t bytes_copied = 0;
|
off_t bytes_copied = 0;
|
||||||
struct ::stat fileinfo = { 0 };
|
struct ::stat fileinfo = { 0 };
|
||||||
if (::fstat(input, &fileinfo) || ::sendfile(output, input, &bytes_copied, fileinfo.st_size))
|
if (::fstat(input, &fileinfo) == -1 || ::sendfile(output, input, &bytes_copied, fileinfo.st_size) == -1)
|
||||||
#else
|
#else
|
||||||
#error "Native file copy implementation is missing"
|
#error "Native file copy implementation is missing"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue