|
|
@@ -1473,22 +1473,17 @@ BOOL CFtpListResult::parseAsMlsd(const char *line, const int linelen, t_director
|
|
|
return TRUE;
|
|
|
}
|
|
|
|
|
|
-bool CFtpListResult::parseMlsdDateTime(CString value, t_directory::t_direntry::t_date &date) const
|
|
|
+bool CFtpListResult::parseMlsdDateTime(const CString value, t_directory::t_direntry::t_date &date) const
|
|
|
{
|
|
|
if (value.IsEmpty())
|
|
|
{
|
|
|
return FALSE;
|
|
|
}
|
|
|
|
|
|
- int P = value.Find('.');
|
|
|
- if (P >= 0)
|
|
|
- {
|
|
|
- value = value.Left(P);
|
|
|
- }
|
|
|
-
|
|
|
bool result = FALSE;
|
|
|
int Year, Month, Day, Hours, Minutes, Seconds;
|
|
|
Year=Month=Day=Hours=Minutes=Seconds=0;
|
|
|
+ // Time can include a fraction after a dot, this will ignore the fraction part.
|
|
|
if (swscanf((LPCWSTR)value, L"%4d%2d%2d%2d%2d%2d", &Year, &Month, &Day, &Hours, &Minutes, &Seconds) == 6)
|
|
|
{
|
|
|
date.hasdate = TRUE;
|