Fix error
This commit is contained in:
parent
57570ff78a
commit
cf4d383b58
2 changed files with 5 additions and 3 deletions
|
@ -356,11 +356,14 @@ public class FavouritesDbHelper {
|
||||||
fld.mkdirs();
|
fld.mkdirs();
|
||||||
}
|
}
|
||||||
int back = 1;
|
int back = 1;
|
||||||
DecimalFormat formatter = new DecimalFormat("00");
|
String backPrefix = "" + back;
|
||||||
|
if(back < 10) {
|
||||||
|
backPrefix = "0"+backPrefix;
|
||||||
|
}
|
||||||
File firstModified = null;
|
File firstModified = null;
|
||||||
long firstModifiedMin = System.currentTimeMillis();
|
long firstModifiedMin = System.currentTimeMillis();
|
||||||
while(back <= BACKUP_CNT) {
|
while(back <= BACKUP_CNT) {
|
||||||
File bak = new File(fld, "favourites_bak_" + formatter.format(back) +".gpx.bz2");
|
File bak = new File(fld, "favourites_bak_" + backPrefix +".gpx.bz2");
|
||||||
if (!bak.exists()) {
|
if (!bak.exists()) {
|
||||||
return bak;
|
return bak;
|
||||||
} else if (bak.lastModified() < firstModifiedMin) {
|
} else if (bak.lastModified() < firstModifiedMin) {
|
||||||
|
|
|
@ -176,7 +176,6 @@ public class NavigationService extends Service implements LocationListener {
|
||||||
if(plugin.getTracker().isEnabledTracker()) {
|
if(plugin.getTracker().isEnabledTracker()) {
|
||||||
plugin.getTracker().disableTracker();
|
plugin.getTracker().disableTracker();
|
||||||
}
|
}
|
||||||
plugin.getService().disconnect();
|
|
||||||
}
|
}
|
||||||
NavigationService.this.stopSelf();
|
NavigationService.this.stopSelf();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue