From 284cab57d30c8c4cdf1f621ab6a67f776cf4ef65 Mon Sep 17 00:00:00 2001 From: Shoya Ishimaru Date: Sun, 19 Jan 2014 16:16:30 +0100 Subject: [PATCH] bug fix: #1 Stop creating a redundant directory --- src/com/mrk1869/glasslogger/LoggerService.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/com/mrk1869/glasslogger/LoggerService.java b/src/com/mrk1869/glasslogger/LoggerService.java index fdd111d..f8b3b76 100644 --- a/src/com/mrk1869/glasslogger/LoggerService.java +++ b/src/com/mrk1869/glasslogger/LoggerService.java @@ -64,18 +64,15 @@ private void foregroundProcessing() { + now.get(GregorianCalendar.SECOND) + "-" + now.get(GregorianCalendar.MILLISECOND); - File logSessionDirectoryPath = new File(Environment.getExternalStorageDirectory() - + "/GlassLogger/" + logSessionIdentifier); + File logSessionDirectoryPath = new File(Environment.getExternalStorageDirectory() + "/GlassLogger/"); try { logSessionDirectoryPath.mkdirs(); } catch (Exception e) {// Catch exception if any Log.e(this.getClass().getSimpleName(), "Error: " + e.getMessage()); - - // TODO } - String logSessionFilePath = logSessionDirectoryPath.getAbsolutePath(); + String logSessionFilePath = Environment.getExternalStorageDirectory() + "/GlassLogger/" + logSessionIdentifier; // accelerometer accLogFileWriter = new LogFileWriter(logSessionFilePath+"_acc.txt");