]> granicus.if.org Git - python/commitdiff
Try /var/mail before trying /usr/mail. Most new systems use /var.
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 24 Mar 2002 01:38:38 +0000 (01:38 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 24 Mar 2002 01:38:38 +0000 (01:38 +0000)
This in inside the test so it really doesn't matter much.  Closes
SF patch 497097.

Lib/mailbox.py

index 302e4b108ac6bc0fe614862b6754ddca24f34681..ed8348971605bb95082ca533d0295b4cb3f3f80f 100755 (executable)
@@ -276,7 +276,10 @@ def _test():
     if mbox[:1] == '+':
         mbox = os.environ['HOME'] + '/Mail/' + mbox[1:]
     elif not '/' in mbox:
-        mbox = '/usr/mail/' + mbox
+        if os.path.isfile('/var/mail/' + mbox):
+            mbox = '/var/mail/' + mbox
+        else:
+            mbox = '/usr/mail/' + mbox
     if os.path.isdir(mbox):
         if os.path.isdir(os.path.join(mbox, 'cur')):
             mb = Maildir(mbox)