diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-01-19 19:51:18 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-01-19 19:51:18 +0100 |
| commit | f7ac004407f7da8781bdb8e502da4bb8f0ae7a8c (patch) | |
| tree | f0827497ab07281f0edc0544e4563bdda9500864 /main/src/cgeo | |
| parent | 7e50a9c7887e340326c0e5e5c7b4a045d3dabb74 (diff) | |
| download | cgeo-f7ac004407f7da8781bdb8e502da4bb8f0ae7a8c.zip cgeo-f7ac004407f7da8781bdb8e502da4bb8f0ae7a8c.tar.gz cgeo-f7ac004407f7da8781bdb8e502da4bb8f0ae7a8c.tar.bz2 | |
Do not hardcode "/sdcard/" to make lint happy
Diffstat (limited to 'main/src/cgeo')
| -rw-r--r-- | main/src/cgeo/geocaching/utils/Log.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/utils/Log.java b/main/src/cgeo/geocaching/utils/Log.java index 4c76c6f..6d57b75 100644 --- a/main/src/cgeo/geocaching/utils/Log.java +++ b/main/src/cgeo/geocaching/utils/Log.java @@ -1,5 +1,7 @@ package cgeo.geocaching.utils; +import android.os.Environment; + import java.io.File; import java.io.FileWriter; import java.io.IOException; @@ -93,7 +95,7 @@ final public class Log { * @param msg the message to log, or to add to the log if other messages have been stored in the same run */ public synchronized static void logToFile(final String msg) { - final File file = new File("/sdcard/cgeo-debug.log"); + final File file = new File(Environment.getExternalStorageDirectory(), "cgeo-debug.log"); if (first) { first = false; file.delete(); |
