Bug 696460 - Database backup fails [Storage: Error creating backup file: ReferenceError: CI is not defined]. r=mschroeder, a=philipp
authorStefan Sitter <ssitter@gmail.com>
Mon, 24 Oct 2011 21:20:15 +0200
changeset 8947 a0f2f5422645d2975c3590d249ef1c1fdb50a278
parent 8946 2b77c4840ab00c557d65ca282206e2b59173fbe0
child 8948 66f80c42268eb60c37b015a58030bc8a69b2f2c0
push id200
push userssitter@gmail.com
push dateMon, 24 Oct 2011 19:20:36 +0000
treeherdercomm-beta@a0f2f5422645 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmschroeder, philipp
bugs696460
Bug 696460 - Database backup fails [Storage: Error creating backup file: ReferenceError: CI is not defined]. r=mschroeder, a=philipp
calendar/providers/storage/calStorageUpgrade.jsm
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -212,17 +212,17 @@ function getVersion(db) {
 function backupDB(db, currentVersion) {
     cal.LOG("Storage: Backing up current database...");
     try {
         // Prepare filenames and path
         let backupFilename = "local.v" + currentVersion + ".sqlite";
         let backupPath = cal.getCalendarDirectory();
         backupPath.append("backup");
         if (!backupPath.exists()) {
-            backupPath.create(CI.nsIFile.DIRECTORY_TYPE, parseInt("0755", 8));
+            backupPath.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, parseInt("0755", 8));
         }
 
         // Create a backup file and notify the user via WARN, since LOG will not
         // be visible unless a pref is set.
         let file = Services.storage.backupDatabaseFile(db.databaseFile, backupFilename, backupPath);
         cal.WARN("Storage: Upgrading to v" + DB_SCHEMA_VERSION + ", a backup was written to: " + file.path);
     } catch (e) {
         cal.ERROR("Storage: Error creating backup file: " + e);