mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Edit: Add try catch for page backups
This commit is contained in:
parent
a28ba26ca6
commit
ef11577d08
@ -21,6 +21,7 @@ public class Pagebaks_addon implements Xoax_addon_itm {
|
||||
// get vars
|
||||
if (!app.Cfg().Get_bool_app_or("xowa.wiki.edit.pagebaks.enabled", true)) return;
|
||||
|
||||
try {
|
||||
// #save file
|
||||
// get file name; note encoding for wnt even on lnx systems just to be consistent
|
||||
Gfo_url_encoder encoder = Gfo_url_encoder_.New__fsys_wnt().Make();
|
||||
@ -45,6 +46,9 @@ public class Pagebaks_addon implements Xoax_addon_itm {
|
||||
for (int i = 0; i < cutoff; i++) {// EX: 3 files and 2 max; 1st file (index 0) needs to be deleted
|
||||
Io_mgr.Instance.DeleteFil(fils[i]);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Gfo_usr_dlg_.Instance.Log_many("", "", "failed to save page backup; wiki=~{0} ttl=~{1} err=~{2}", wiki.Domain_bry(), ttl.Full_db(), Err_.Message_gplx_log(e));
|
||||
}
|
||||
}
|
||||
|
||||
public String Addon__key() {return "xowa.wikis.edits.pagebaks";}
|
||||
|
Loading…
Reference in New Issue
Block a user