Permalink
Browse files

front: create profiles directory if it doesn't exist when saving cheats.

  • Loading branch information...
1 parent dda18a2 commit cb5e0bc41e5bc1e9627d6cb5f9d7cc1d56146b2e @fzurita fzurita committed Mar 23, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/paulscode/android/mupen64plusae/cheat/CheatEditorActivity.java
@@ -20,6 +20,7 @@
*/
package paulscode.android.mupen64plusae.cheat;
+import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -210,6 +211,8 @@ private void save( String crc )
combinedCheats.addAll(userCheats);
Collections.sort(combinedCheats);
+ new File( mGlobalPrefs.customCheats_txt ).getParentFile().mkdirs();
+
CheatFile usrcheat_txt = new CheatFile( mGlobalPrefs.customCheats_txt, true );
CheatFile mupencheat_txt = new CheatFile( mAppData.mupencheat_txt, true );
CheatUtils.save( crc, usrcheat_txt, userCheats, mRomHeaderName, mRomCountryCode, this, false );

0 comments on commit cb5e0bc

Please sign in to comment.