From 98d5f7c43312e5cba33d7dca38b3fcffc10cd645 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 12 Aug 2013 16:20:11 +0200 Subject: ftp: ignore ms in mlsd, process path in ftp-get - ftp-get: when 'get bar.ext' on ftp.example.com/foo/, the directory 'foo' won't be created. --- ftp.py | 1 + 1 file changed, 1 insertion(+) (limited to 'ftp.py') diff --git a/ftp.py b/ftp.py index c6ca471..3d6565c 100755 --- a/ftp.py +++ b/ftp.py @@ -93,6 +93,7 @@ def format_type_fact(type): return "?" def dt_from_ftp(timeval): + timeval = timeval.split(".")[0] return datetime.strptime(timeval, "%Y%m%d%H%M%S").replace(tzinfo=timezone.utc) def format_mlsd(name, facts): -- cgit v1.2.1