mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 754671 - Follow-up to rename old thumbnail folder instead of removing it; r=felipe
This commit is contained in:
parent
cfcb7866db
commit
c8ae38b92b
@ -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.
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user