Bug 754671 - Follow-up to rename old thumbnail folder instead of removing it; r=felipe

This commit is contained in:
Tim Taubert 2012-08-21 17:02:33 -07:00
parent cfcb7866db
commit c8ae38b92b

View File

@ -368,7 +368,7 @@ let PageThumbsStorageMigrator = {
this.removeThumbnailsFromRoamingProfile();
}
if (version < 2) {
this.clearThumbnailsFolder();
this.renameThumbnailsFolder();
}
this.currentVersion = LATEST_STORAGE_VERSION;
@ -389,13 +389,12 @@ let PageThumbsStorageMigrator = {
}
},
clearThumbnailsFolder: function Migrator_clearThumbnailsFolder() {
renameThumbnailsFolder: function Migrator_renameThumbnailsFolder() {
let dir = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]);
dir.followLinks = false;
try {
dir.remove(true);
dir.moveTo(null, dir.leafName + "-old");
} catch (e) {
// The directory might not exist or we're not permitted to remove it.
// The directory might not exist or we're not permitted to rename it.
}
}
};