diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-09-16 15:37:58 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-09-16 15:37:58 +0200 |
| commit | 1467f955b65cf60c4302b5aaceb327c152fc5223 (patch) | |
| tree | 6edc98943adefc99b8aae4c1f6166744f48f43c5 /main/src | |
| parent | 6ddd76f0ff4ee1711e0db76391723a9d92cad2d1 (diff) | |
| download | cgeo-1467f955b65cf60c4302b5aaceb327c152fc5223.zip cgeo-1467f955b65cf60c4302b5aaceb327c152fc5223.tar.gz cgeo-1467f955b65cf60c4302b5aaceb327c152fc5223.tar.bz2 | |
Add code documentation for local spoilers usage
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index 333090f..b715dd6 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -1701,14 +1701,19 @@ public class Geocache implements ICache, IWaypoint { return result; } - // Add spoilers stored locally in /sdcard/GeocachePhotos + /** + * Add spoilers stored locally in <tt>/sdcard/GeocachePhotos</tt>. If a cache is named GC123ABC, the + * directory will be <tt>/sdcard/GeocachePhotos/C/B/GC123ABC/</tt>. + * + * @param spoilers the list to add to + */ private void addLocalSpoilersTo(final List<Image> spoilers) { if (StringUtils.length(geocode) >= 2) { final String suffix = StringUtils.right(geocode, 2); - final File baseDir = new File(Environment.getExternalStorageDirectory().toString(), "GeocachePhotos"); + final File baseDir = new File(Environment.getExternalStorageDirectory(), "GeocachePhotos"); final File lastCharDir = new File(baseDir, suffix.substring(1)); final File secondToLastCharDir = new File(lastCharDir, suffix.substring(0, 1)); - final File finalDir = new File(secondToLastCharDir, getGeocode()); + final File finalDir = new File(secondToLastCharDir, geocode); final File[] files = finalDir.listFiles(); if (files != null) { for (final File image : files) { |
