Skip to content

Commit

Permalink
fixed crash on WP8. it happened when we start app second time and more
Browse files Browse the repository at this point in the history
  • Loading branch information
rognar committed Mar 18, 2013
1 parent 0280f2b commit d33201e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions platform/wp8/build/wp.rake
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -205,11 +205,12 @@ namespace "build" do
Dir.glob(File.join("**", '*.*')).each do |f| Dir.glob(File.join("**", '*.*')).each do |f|
if #f.start_with?('db') || if #f.start_with?('db') ||
f.end_with?('.rb') || f.end_with?('.rb') ||
f.end_with?('.erb') || f.end_with?('.erb')
# ||
#f == "apps/app_manifest.txt" || #f == "apps/app_manifest.txt" ||
#f == "apps/rhoconfig.txt" || #f == "apps/rhoconfig.txt" ||
#f == "apps/rhoconfig.txt.timestamp" || #f == "apps/rhoconfig.txt.timestamp" ||
f == "RhoBundleMap.txt" #f == "RhoBundleMap.txt"
next; next;
end end


Expand Down
10 changes: 5 additions & 5 deletions platform/wp8/rhodes/common/RhoResourceMap.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static void clearMap(String strMap)
{ {
CRhoFile.deleteFile(strFile); CRhoFile.deleteFile(strFile);
} }
} }
} }


private static void copyMap(String strMap) private static void copyMap(String strMap)
Expand All @@ -63,7 +63,7 @@ private static void copyMap(String strMap)
{ {
String[] values = files[i].Split('|'); String[] values = files[i].Split('|');


String strFile = values[0]; String strFile = values[0];
String strDstFile = values[1]; String strDstFile = values[1];


System.Diagnostics.Debugger.Log(0, "", strDstFile + "\n"); System.Diagnostics.Debugger.Log(0, "", strDstFile + "\n");
Expand All @@ -75,7 +75,7 @@ private static void copyMap(String strMap)
CRhoFile.writeStringToFile("RhoBundleMap.txt", strMap); CRhoFile.writeStringToFile("RhoBundleMap.txt", strMap);
} }


public static void deployContent() public static void deployContent()
{ {
String newMap = CRhoFile.readStringFromResourceFile("RhoBundleMap.txt"); String newMap = CRhoFile.readStringFromResourceFile("RhoBundleMap.txt");
String curMap = CRhoFile.readStringFromFile("RhoBundleMap.txt"); String curMap = CRhoFile.readStringFromFile("RhoBundleMap.txt");
Expand All @@ -84,10 +84,10 @@ public static void deployContent()
{ {
copyMap(newMap); copyMap(newMap);
} }
else if (curMap != newMap) else if (curMap != newMap && newMap != "")
{ {
clearMap(curMap); clearMap(curMap);
copyMap(newMap); copyMap(newMap);
} }
} }
} }
Expand Down

0 comments on commit d33201e

Please sign in to comment.