Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-06-14 20:57:45 +02:00
commit 4fefac9ecf

View file

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