aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/Archive/LzhHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CPP/7zip/Archive/LzhHandler.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/CPP/7zip/Archive/LzhHandler.cpp b/CPP/7zip/Archive/LzhHandler.cpp
index e1984d2..6711da6 100644
--- a/CPP/7zip/Archive/LzhHandler.cpp
+++ b/CPP/7zip/Archive/LzhHandler.cpp
@@ -487,22 +487,11 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
487 case kpidHostOS: PAIR_TO_PROP(g_OsPairs, item.OsId, prop); break; 487 case kpidHostOS: PAIR_TO_PROP(g_OsPairs, item.OsId, prop); break;
488 case kpidMTime: 488 case kpidMTime:
489 { 489 {
490 FILETIME utc;
491 UInt32 unixTime; 490 UInt32 unixTime;
492 if (item.GetUnixTime(unixTime)) 491 if (item.GetUnixTime(unixTime))
493 NTime::UnixTimeToFileTime(unixTime, utc); 492 PropVariant_SetFrom_UnixTime(prop, unixTime);
494 else 493 else
495 { 494 PropVariant_SetFrom_DosTime(prop, item.ModifiedTime);
496 FILETIME localFileTime;
497 if (DosTimeToFileTime(item.ModifiedTime, localFileTime))
498 {
499 if (!LocalFileTimeToFileTime(&localFileTime, &utc))
500 utc.dwHighDateTime = utc.dwLowDateTime = 0;
501 }
502 else
503 utc.dwHighDateTime = utc.dwLowDateTime = 0;
504 }
505 prop = utc;
506 break; 495 break;
507 } 496 }
508 // case kpidAttrib: prop = (UInt32)item.Attributes; break; 497 // case kpidAttrib: prop = (UInt32)item.Attributes; break;