diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 824237f0fd..64b2f53455 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -31,6 +31,7 @@ import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.ListFragment; import android.support.v4.view.ViewPager; +import android.util.Log; import android.view.MenuItem; import android.view.View; import android.widget.ArrayAdapter; @@ -378,9 +379,12 @@ public class DownloadActivity extends BaseDownloadActivity { @Override public void onClick(DialogInterface dialog, int which) { for(String w : wiki) { - File fl = new File(w); - File nf = new File(fl.getParentFile() +"/" + IndexConstants.BACKUP_INDEX_DIR, fl.getName()); - fl.renameTo(nf); + File fl = getMyApplication().getAppPath(w); + File nf = new File(fl.getParentFile(), IndexConstants.BACKUP_INDEX_DIR + "/"+fl.getName()); + boolean res = fl.renameTo(nf); + if(!res) { + System.err.println("Renaming from " + fl.getAbsolutePath() + " to " + nf.getAbsolutePath() + " failed"); + } } } });