Fix downnload activity archive
This commit is contained in:
parent
6ef86099af
commit
2957968fcc
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||||
|
@ -379,8 +380,11 @@ public class DownloadActivity extends BaseDownloadActivity {
|
||||||
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 = new File(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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue