diff --git a/app/build.gradle b/app/build.gradle index 49420e39..8785518a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { minSdkVersion 14 targetSdkVersion 22 - versionCode 82 - versionName "0.9.0.4" + versionCode 83 + versionName "0.9.1" buildConfigField "java.util.Date", "buildTime", "new java.util.Date()" } diff --git a/app/src/main/java/at/bitfire/davdroid/log/ExternalFileLogger.java b/app/src/main/java/at/bitfire/davdroid/log/ExternalFileLogger.java index 07e61a3a..fd99c787 100644 --- a/app/src/main/java/at/bitfire/davdroid/log/ExternalFileLogger.java +++ b/app/src/main/java/at/bitfire/davdroid/log/ExternalFileLogger.java @@ -10,6 +10,8 @@ package at.bitfire.davdroid.log; import android.content.Context; +import org.apache.commons.lang3.StringUtils; + import java.io.Closeable; import java.io.File; import java.io.IOException; @@ -24,7 +26,9 @@ public class ExternalFileLogger extends CustomLogger implements Closeable { if (dir == null) throw new IOException("External media not available for log creation"); - File log = new File(dir, name = fileName); + name = StringUtils.remove(StringUtils.remove(fileName, File.pathSeparatorChar), File.separatorChar); + + File log = new File(dir, name); writer = new PrintWriter(log); }