fixed path in webmail/lib.py

If you had moved your MEDIA_ROOT somewhere else, this wouldn't have
worked probably.
This commit is contained in:
Simon Kern
2013-05-09 12:58:04 +02:00
parent 9943fbdd7a
commit 9bc2a84bca
+3 -3
View File
@@ -291,9 +291,9 @@ class ImapEmail(Email):
for cid, params in self.bs.inlines.iteritems():
if re.search("\.\.", cid):
continue
fname = "media/webmail/%s_%s" % (self.mailid, cid)
path = os.path.join(settings.MODOBOA_DIR, fname)
params["fname"] = "/%s" % fname
fname = "webmail/%s_%s" % (self.mailid, cid)
path = os.path.join(settings.MEDIA_ROOT, fname)
params["fname"] = settings.MEDIA_URL/+"%s" % fname
if os.path.exists(path):
continue