Merge branch 'master' into 1.8

This commit is contained in:
Wojtek Figat
2024-01-05 17:13:51 +01:00
49 changed files with 619 additions and 261 deletions

View File

@@ -244,7 +244,7 @@ bool AndroidFileSystem::FileExists(const StringView& path)
bool AndroidFileSystem::DeleteFile(const StringView& path)
{
const StringAsANSI<> pathANSI(*path, path.Length());
return unlink(pathANSI.Get()) == 0;
return unlink(pathANSI.Get()) != 0;
}
uint64 AndroidFileSystem::GetFileSize(const StringView& path)
@@ -517,7 +517,7 @@ DateTime AndroidFileSystem::GetFileLastEditTime(const StringView& path)
const StringAsANSI<> pathANSI(*path, path.Length());
if (stat(pathANSI.Get(), &fileInfo) == -1)
return DateTime::MinValue();
const TimeSpan timeSinceEpoch(0, 0, fileInfo.st_mtime);
const TimeSpan timeSinceEpoch(0, 0, 0, fileInfo.st_mtime);
const DateTime UnixEpoch(1970, 1, 1);
return UnixEpoch + timeSinceEpoch;
}