mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00: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+
|
||||
off_t bytes_copied = 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
|
||||
#error "Native file copy implementation is missing"
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue