git » sea » commit 24ab850

Put the date at the begining of the directory name

author Alberto Bertogli
2010-06-24 23:50:45 UTC
committer Alberto Bertogli
2010-06-24 23:50:45 UTC
parent 2d894b02f23ca7e251bccec843bed3f5b67f1efa

Put the date at the begining of the directory name

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

sea +4 -3

diff --git a/sea b/sea
index 6a5ff08..d55740e 100755
--- a/sea
+++ b/sea
@@ -29,9 +29,10 @@ def main(infd, basepath):
 	if 'date' in m:
 		date = email.utils.parsedate(m['date'])
 
-	# put the attachments in basepath/<from>-<time>
-	outpath = "%s/%s~%s/" % (basepath, f_email.replace('/', ''),
-			time.strftime("%Y-%m-%d-%H:%M:%S", date))
+	# put the attachments in basepath/<time>-<from>
+	outpath = "%s/%s~%s/" % (basepath,
+			time.strftime("%Y-%m-%d-%H:%M:%S", date),
+			f_email.replace('/', ''),)
 
 	count = 0
 	for part in m.walk():