mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-03 05:57:40 -05:00
fix: Compiling of time functions on Unix
This commit is contained in:
@@ -148,16 +148,9 @@ namespace hex::plugin::builtin::prv {
|
||||
result.emplace_back("hex.builtin.provider.file.size"_lang, hex::toByteString(this->getActualSize()));
|
||||
|
||||
if (this->m_fileStatsValid) {
|
||||
std::string buffer(0xFF, '\x00');
|
||||
|
||||
if (ctime_s(buffer.data(), buffer.size(), &this->m_fileStats.st_ctime) == 0)
|
||||
result.emplace_back("hex.builtin.provider.file.creation"_lang, buffer);
|
||||
|
||||
if (ctime_s(buffer.data(), buffer.size(), &this->m_fileStats.st_atime) == 0)
|
||||
result.emplace_back("hex.builtin.provider.file.access"_lang, buffer);
|
||||
|
||||
if (ctime_s(buffer.data(), buffer.size(), &this->m_fileStats.st_mtime) == 0)
|
||||
result.emplace_back("hex.builtin.provider.file.modification"_lang, buffer);
|
||||
result.emplace_back("hex.builtin.provider.file.creation"_lang, hex::format("{}", fmt::localtime(this->m_fileStats.st_ctime)));
|
||||
result.emplace_back("hex.builtin.provider.file.access"_lang, hex::format("{}", fmt::localtime(this->m_fileStats.st_atime)));
|
||||
result.emplace_back("hex.builtin.provider.file.modification"_lang, hex::format("{}", fmt::localtime(this->m_fileStats.st_mtime)));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user