From 1bae3afa6f0f322c142465af0f41db9fc3dc9d0e Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Wed, 29 May 2013 22:18:55 +0300 Subject: [PATCH] Fixed DeleteFilesOnUpgrade option not working properly --- project/java/Settings.java | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/project/java/Settings.java b/project/java/Settings.java index 29409f69d..5a2ce7ea3 100644 --- a/project/java/Settings.java +++ b/project/java/Settings.java @@ -355,7 +355,7 @@ class Settings Log.i("SDL", "libSDL: old cfg version " + cfgVersion + ", our version " + p.getApplicationVersion()); if( cfgVersion != p.getApplicationVersion() ) { - DeleteFilesOnUpgrade(); + DeleteFilesOnUpgrade(p); if( Globals.ResetSdlConfigForThisVersion ) { Log.i("SDL", "libSDL: old cfg version " + cfgVersion + ", our version " + p.getApplicationVersion() + " and we need to clean up config file"); @@ -370,7 +370,7 @@ class Settings } catch( FileNotFoundException e ) { } catch( SecurityException e ) { } catch ( IOException e ) { - DeleteFilesOnUpgrade(); + DeleteFilesOnUpgrade(p); if( Globals.ResetSdlConfigForThisVersion ) { Log.i("SDL", "libSDL: old cfg version unknown or too old, our version " + p.getApplicationVersion() + " and we need to clean up config file"); @@ -2608,7 +2608,8 @@ class Settings { if (dir.isDirectory()) { String[] children = dir.list(); - for (int i=0; i