diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java index cd46f717d..e386fdb9b 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java @@ -116,7 +116,7 @@ public class DictsActivity extends ListActivity editor.commit(); break; case R.id.dicts_item_delete: - deleteFile( m_dicts[info.position] ); + GameUtils.deleteDict( this, m_dicts[info.position] ); mkListAdapter(); handled = true; break; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java index fe91f13fd..5c56d8b34 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java @@ -234,6 +234,14 @@ public class GameUtils { return al.toArray( new String[al.size()] ); } + public static void deleteDict( Context context, String name ) + { + if ( ! name.endsWith( XWConstants.DICT_EXTN ) ) { + name += XWConstants.DICT_EXTN; + } + context.deleteFile( name ); + } + public static byte[] openDict( Context context, String name ) { byte[] bytes = null;