summaryrefslogtreecommitdiff
path: root/ftp-list.py
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-08-12 16:20:11 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-08-12 16:20:11 +0200
commit98d5f7c43312e5cba33d7dca38b3fcffc10cd645 (patch)
treecb0b5837983e40584df0541a27d3b3639ca51d2b /ftp-list.py
parenteeb5f89ba0000edf6a5480a38ff6fca958c4ef32 (diff)
downloadscripts-98d5f7c43312e5cba33d7dca38b3fcffc10cd645.tar.gz
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.
Diffstat (limited to 'ftp-list.py')
-rwxr-xr-xftp-list.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ftp-list.py b/ftp-list.py
index 057b117..8aa073c 100755
--- a/ftp-list.py
+++ b/ftp-list.py
@@ -126,6 +126,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):