mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Lots of defect fixes
This commit is contained in:
parent
5dfc22a604
commit
fac9d74344
21 changed files with 341 additions and 95 deletions
|
@ -327,7 +327,13 @@ int OSCopyFile(const char* source, const char* destination, bool overwrite)
|
|||
//sendfile will work with non-socket output (i.e. regular file) on Linux 2.6.33+
|
||||
off_t bytesCopied = 0;
|
||||
struct stat fileinfo = { 0 };
|
||||
fstat(input, &fileinfo);
|
||||
|
||||
s32 ret = fstat(input, &fileinfo);
|
||||
if (ret < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int result = sendfile(output, input, &bytesCopied, fileinfo.st_size) == -1 ? -1 : 0;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue