You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/04/18 00:01:45 UTC

ios commit: Re-fix CB-347 - don't apply .plist fix if the key does not exist

Updated Branches:
  refs/heads/1.6.1 8747ba4c0 -> d358ab2b3


Re-fix CB-347 - don't apply .plist fix if the key does not exist


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/d358ab2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/d358ab2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/d358ab2b

Branch: refs/heads/1.6.1
Commit: d358ab2b332a893a6c73841303fd5d1cbf6b7c0e
Parents: 8747ba4
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Apr 17 15:01:37 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Apr 17 15:01:37 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVLocalStorage.m |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/d358ab2b/CordovaLib/Classes/CDVLocalStorage.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocalStorage.m b/CordovaLib/Classes/CDVLocalStorage.m
index 628bb27..0fe9dc6 100644
--- a/CordovaLib/Classes/CDVLocalStorage.m
+++ b/CordovaLib/Classes/CDVLocalStorage.m
@@ -265,8 +265,8 @@
     for (NSString* key in keysToCheck) 
     {
         NSString* value = [appPlistDict objectForKey:key];
-        // verify path is in app bundle, if not - fix
-        if (![value hasPrefix:bundlePath]) 
+        // verify key exists, and path is in app bundle, if not - fix
+        if (value != nil && ![value hasPrefix:bundlePath]) 
         {
             // the pathSuffix to use may be wrong - OTA upgrades from < 5.1 to 5.1 do keep the old path Library/WebKit, 
             // while Xcode synced ones do change the storage location to Library/Caches