mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-03 19:21:13 +00:00
Log an error if ftruncate() fails.
This commit is contained in:
parent
08032e4b14
commit
afe42fa505
@ -381,9 +381,13 @@ void DirectoryFileHandle::Close()
|
||||
if (needsTrunc_ != -1) {
|
||||
#ifdef _WIN32
|
||||
Seek((s32)needsTrunc_, FILEMOVE_BEGIN);
|
||||
SetEndOfFile(hFile);
|
||||
if (SetEndOfFile(hFile) == 0) {
|
||||
ERROR_LOG_REPORT(FILESYS, "Failed to truncate file.");
|
||||
}
|
||||
#else
|
||||
ftruncate(hFile, (off_t)needsTrunc_);
|
||||
if (ftruncate(hFile, (off_t)needsTrunc_) != 0) {
|
||||
ERROR_LOG_REPORT(FILESYS, "Failed to truncate file.");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef _WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user