mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
store davmail.log in user home folder to avoid crash on first start when current directory is not writable by user
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1949 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
7132225895
commit
6a0b615507
@ -189,10 +189,14 @@ public final class Settings {
|
||||
*/
|
||||
public static String getLogFilePath() {
|
||||
String logFilePath = Settings.getProperty("davmail.logFilePath");
|
||||
// use default log file path on Mac OS X
|
||||
// set default log file path
|
||||
if ((logFilePath == null || logFilePath.length() == 0)) {
|
||||
if (System.getProperty("os.name").toLowerCase().startsWith("mac os x")) {
|
||||
// store davmail.log in OSX Logs directory
|
||||
logFilePath = System.getProperty("user.home") + "/Library/Logs/DavMail/davmail.log";
|
||||
} else {
|
||||
// store davmail.log in user home folder
|
||||
logFilePath = System.getProperty("user.home") + "/davmail.log";
|
||||
}
|
||||
} else {
|
||||
File logFile = new File(logFilePath);
|
||||
|
Loading…
Reference in New Issue
Block a user