clear rolled back package files

This commit is contained in:
Geoffrey Goh
2015-12-28 18:24:23 -08:00
parent 03e91b3ff9
commit b7f47b785a
2 changed files with 14 additions and 1 deletions

View File

@@ -187,6 +187,8 @@ public class CodePushPackage {
public void rollbackPackage() throws IOException {
WritableMap info = getCurrentPackageInfo();
String currentPackageFolderPath = getCurrentPackageFolderPath();
CodePushUtils.deleteDirectoryAtPath(currentPackageFolderPath);
info.putString(CURRENT_PACKAGE_KEY, CodePushUtils.tryGetString(info, PREVIOUS_PACKAGE_KEY));
info.putNull(PREVIOUS_PACKAGE_KEY);
updateCurrentPackageInfo(info);