mirror of
https://github.com/cryptomator/cryptomator.git
synced 2025-02-10 20:32:56 +00:00
logging to %appdata% on windows
This commit is contained in:
parent
c5b241a68a
commit
b6383f49b1
@ -42,7 +42,7 @@
|
||||
<fx:application name="${javafx.application.name}" version="${project.version}" mainClass="${exec.mainClass}" />
|
||||
<fx:info title="${javafx.application.name}" vendor="cryptomator.org" copyright="cryptomator.org" license="MIT" category="Utility" />
|
||||
<fx:platform javafx="2.2+" j2se="8.0" >
|
||||
<fx:property name="logPath" value="cryptomator.log" />
|
||||
<fx:property name="logPath" value="%appdata%/Cryptomator/cryptomator.log" />
|
||||
</fx:platform>
|
||||
<fx:resources>
|
||||
<fx:fileset dir="../target/" includes="Cryptomator-${project.parent.version}.jar" />
|
||||
|
@ -64,6 +64,10 @@ public class ConfigurableFileAppender extends AbstractOutputStreamAppender<FileM
|
||||
} else if (fileName.startsWith("/")) {
|
||||
// absolute Path:
|
||||
filePath = FileSystems.getDefault().getPath(fileName);
|
||||
} else if (SystemUtils.IS_OS_WINDOWS && fileName.startsWith("%appdata%/")) {
|
||||
final String appdata = System.getenv("APPDATA");
|
||||
final Path appdataPath = appdata != null ? FileSystems.getDefault().getPath(appdata) : FileSystems.getDefault().getPath(SystemUtils.USER_HOME);
|
||||
filePath = appdataPath.resolve(fileName.substring(10));
|
||||
} else {
|
||||
// relative Path:
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user