diff --git a/kmacctlocal.cpp b/kmacctlocal.cpp index bb92c50de..1650c433b 100644 --- a/kmacctlocal.cpp +++ b/kmacctlocal.cpp @@ -13,6 +13,12 @@ #include #include #include +#ifdef __FreeBSD__ +#include /* defines _PATH_MAILDIR */ +#endif +#ifndef _PATH_MAILDIR +#define _PATH_MAILDIR "/var/spool/mail" +#endif //----------------------------------------------------------------------------- @@ -40,8 +46,9 @@ const char* KMAcctLocal::type(void) const //----------------------------------------------------------------------------- void KMAcctLocal::init(void) { - mLocation = "/var/spool/mail/"; + mLocation = _PATH_MAILDIR; mLocation.detach(); + mLocation += "/"; mLocation += getenv("USER"); } @@ -110,7 +117,8 @@ bool KMAcctLocal::processNewMail(KMIOStatus *statusWdg) //----------------------------------------------------------------------------- void KMAcctLocal::readConfig(KConfig& config) { - QString defaultPath("/var/spool/mail/"); + QString defaultPath(_PATH_MAILDIR); + defaultPath += "/"; defaultPath += getenv("USER"); KMAcctLocalInherited::readConfig(config);