浏览代码

Revert "Bug 1655: Cannot handle Modify fact of MLSD/MLST FTP response containing fraction" + Explanation in comment.

This reverts commit 55d3e2a0a63d1da32c9bfaa273d65805c8fdf323.

# Conflicts:
#	source/filezilla/FtpListResult.cpp

Source commit: 607c584863d3804ee3b59e3b2ab1df962349cffd
Martin Prikryl 7 年之前
父节点
当前提交
a1e449fc74
共有 2 个文件被更改,包括 3 次插入8 次删除
  1. 2 7
      source/filezilla/FtpListResult.cpp
  2. 1 1
      source/filezilla/FtpListResult.h

+ 2 - 7
source/filezilla/FtpListResult.cpp

@@ -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;

+ 1 - 1
source/filezilla/FtpListResult.h

@@ -61,7 +61,7 @@ private:
   bool parseTime(const char * str, int len, t_directory::t_direntry::t_date & date) const;
   bool ParseSize(const char * str, int len, __int64 & size) const;
 
-  bool parseMlsdDateTime(CString value, t_directory::t_direntry::t_date & date) const;
+  bool parseMlsdDateTime(const CString value, t_directory::t_direntry::t_date & date) const;
 
   int pos;
   struct t_list