mirror of https://github.com/PCSX2/pcsx2.git
FileSystem: Partial revert of c82f800
Mixing stdio and raw FD access is a bad thing, filelength() isn't going to return correct results when extending a file has been buffered.
This commit is contained in:
parent
31029b2fe4
commit
68ad3e8db4
|
@ -748,13 +748,6 @@ s64 FileSystem::FTell64(std::FILE* fp)
|
||||||
|
|
||||||
s64 FileSystem::FSize64(std::FILE* fp)
|
s64 FileSystem::FSize64(std::FILE* fp)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
|
||||||
const int fd = _fileno(fp);
|
|
||||||
if (fd >= 0)
|
|
||||||
{
|
|
||||||
return _filelengthi64(fd);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
const s64 pos = FTell64(fp);
|
const s64 pos = FTell64(fp);
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
{
|
{
|
||||||
|
@ -765,7 +758,6 @@ s64 FileSystem::FSize64(std::FILE* fp)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue