]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Sat Mar 31 00:41:19 BST 2012 Peter Le Bek <peter@hyperplex.net>
authorDaira Hopwood <daira@jacaranda.org>
Thu, 5 Sep 2013 17:10:05 +0000 (18:10 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 5 Sep 2013 17:10:05 +0000 (18:10 +0100)
  * fix ftpd mtime retrieval

src/allmydata/frontends/ftpd.py

index fde72d7fe779e7523e8a689d0f4c7bcacebfebed..4ccb091919536f241c9e113b52898233aa52fbe8 100644 (file)
@@ -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":