From 15a4699d7a62363b01c1b43914f7ebae9397fe71 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 5 Sep 2013 18:10:05 +0100 Subject: [PATCH] Sat Mar 31 00:41:19 BST 2012 Peter Le Bek * fix ftpd mtime retrieval --- src/allmydata/frontends/ftpd.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/allmydata/frontends/ftpd.py b/src/allmydata/frontends/ftpd.py index fde72d7f..4ccb0919 100644 --- a/src/allmydata/frontends/ftpd.py +++ b/src/allmydata/frontends/ftpd.py @@ -201,7 +201,11 @@ class Handler: elif key == "hardlinks": value = 1 elif key == "modified": - value = metadata.get("mtime", 0) + # follow sftpd convention (i.e. linkmotime in preference to mtime) + if "linkmotime" in metadata.get("tahoe", {}): + value = metadata["tahoe"]["linkmotime"] + else: + value = metadata.get("mtime", 0) elif key == "owner": value = self.username elif key == "group": -- 2.45.2