|
@@ -4331,7 +4331,8 @@ bool CFtpControlSocket::HandleMdtm(int code, t_directory::t_direntry::t_date & d
|
|
|
CString line = GetReply();
|
|
CString line = GetReply();
|
|
|
if ( line.GetLength()>4 && line.Left(4) == L"213 " )
|
|
if ( line.GetLength()>4 && line.Left(4) == L"213 " )
|
|
|
{
|
|
{
|
|
|
- int y=0, M=0, d=0, h=0, m=0;
|
|
|
|
|
|
|
+ int y=0, M=0, d=0, h=0, m=0, s=0;
|
|
|
|
|
+ bool hasseconds = false;
|
|
|
line=line.Mid(4);
|
|
line=line.Mid(4);
|
|
|
y=_ttoi(line.Left(4));
|
|
y=_ttoi(line.Left(4));
|
|
|
if (y && line.GetLength()>4)
|
|
if (y && line.GetLength()>4)
|
|
@@ -4353,10 +4354,12 @@ bool CFtpControlSocket::HandleMdtm(int code, t_directory::t_direntry::t_date & d
|
|
|
if (m && line.GetLength()>2)
|
|
if (m && line.GetLength()>2)
|
|
|
{
|
|
{
|
|
|
line=line.Mid(2);
|
|
line=line.Mid(2);
|
|
|
|
|
+ s=_ttoi(line.Left(2));
|
|
|
|
|
+ hasseconds = true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (M>0 && M<=12 && d>0 && d<=31 && h>=0 && h<24 && m>=0 && m<60)
|
|
|
|
|
|
|
+ if (M>0 && M<=12 && d>0 && d<=31 && h>=0 && h<24 && m>=0 && m<60 && s>=0 && s<60)
|
|
|
{
|
|
{
|
|
|
result = true;
|
|
result = true;
|
|
|
date.year = y;
|
|
date.year = y;
|
|
@@ -4364,9 +4367,9 @@ bool CFtpControlSocket::HandleMdtm(int code, t_directory::t_direntry::t_date & d
|
|
|
date.day = d;
|
|
date.day = d;
|
|
|
date.hour = h;
|
|
date.hour = h;
|
|
|
date.minute = m;
|
|
date.minute = m;
|
|
|
- date.second = 0;
|
|
|
|
|
|
|
+ date.second = s;
|
|
|
date.hastime = true;
|
|
date.hastime = true;
|
|
|
- date.hasseconds = false;
|
|
|
|
|
|
|
+ date.hasseconds = hasseconds;
|
|
|
date.hasdate = true;
|
|
date.hasdate = true;
|
|
|
date.utc = true;
|
|
date.utc = true;
|
|
|
}
|
|
}
|