Use _PATH_MAILDIR instead of hardcoded /var/mail

This commit is contained in:
Stefan Eßer 1998-03-06 19:44:12 +00:00
parent 7b07d94817
commit 010d67f2a4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=10053

View file

@ -1,18 +1,34 @@
*** kmail/kmacctlocal.cpp~ Sat Feb 28 15:56:44 1998
--- kmail/kmacctlocal.cpp Sat Feb 28 15:57:14 1998
*** kmail/kmacctlocal.cpp~ Fri Mar 6 19:51:06 1998
--- kmail/kmacctlocal.cpp Fri Mar 6 19:50:43 1998
***************
*** 42,46 ****
*** 13,16 ****
--- 13,22 ----
#include <stdio.h>
#include <errno.h>
+ #ifdef __FreeBSD__
+ #include <paths.h> /* defines _PATH_MAILDIR */
+ #endif
+ #ifndef _PATH_MAILDIR
+ #define _PATH_MAILDIR "/var/spool/mail"
+ #endif
***************
*** 42,47 ****
void KMAcctLocal::init(void)
{
! mLocation = "/var/spool/mail/";
mLocation.detach();
mLocation += getenv("USER");
--- 42,46 ----
}
--- 48,54 ----
void KMAcctLocal::init(void)
{
! mLocation = "/var/mail/";
! mLocation = _PATH_MAILDIR;
mLocation.detach();
+ mLocation += "/";
mLocation += getenv("USER");
}
***************
*** 99,103 ****
void KMAcctLocal::readConfig(KConfig& config)
@ -20,9 +36,10 @@
! QString defaultPath("/var/spool/mail/");
defaultPath += getenv("USER");
--- 99,103 ----
--- 106,111 ----
void KMAcctLocal::readConfig(KConfig& config)
{
! QString defaultPath("/var/mail/");
! QString defaultPath(_PATH_MAILDIR);
! defaultPath += "/";
defaultPath += getenv("USER");