From 95612b256ff80608eb42e379fdb81f4bf2c00e46 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Thu, 12 Nov 2009 17:34:11 -0800 Subject: [PATCH] Fix for broken rm_rf reference in bundletask, as well as using Info.plist by default. Reviewed by me. --- Objective-J/CommonJS/lib/objective-j/jake/bundletask.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js b/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js index 1605c8372..0d76a9b44 100644 --- a/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js +++ b/Objective-J/CommonJS/lib/objective-j/jake/bundletask.js @@ -58,7 +58,7 @@ function BundleTask(aName, anApplication) this._replacedFiles = { }; this._nib2cibFlags = null; - this._infoPlistPath = null; + this._infoPlistPath = "Info.plist"; this._principalClass = null; } @@ -339,7 +339,7 @@ BundleTask.prototype.infoPlist = function() var infoPlistPath = this.infoPlistPath(), objj_dictionary = require("objective-j").objj_dictionary; - if (infoPlistPath) + if (infoPlistPath && FILE.exists(infoPlistPath)) var infoPlist = require("objective-j/plist").readPlist(infoPlistPath); else var infoPlist = new objj_dictionary(); @@ -454,7 +454,7 @@ BundleTask.prototype.defineResourceTask = function(aResourcePath, aDestinationPa filedir (aDestinationPath, [aResourcePath], function() { if (FILE.exists(aDestinationPath)) - rm_rf(aDestinationPath); + try { FILE.rmtree(aDestinationPath); } catch (anException) { } if (FILE.isDirectory(aResourcePath)) FILE.copyTree(aResourcePath, aDestinationPath);