Update chrome.js

This commit is contained in:
Namhyeon Go 2022-01-11 21:32:18 +09:00 committed by GitHub
parent 852365cc1e
commit a5e50771b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,18 @@ var ChromeObject = function() {
this.clearProfile = function() {
var FN = SHELL.getPathOfMyDocuments() + "\\UserData_Chrome_" + this.profileName + "\\" + this.profileName;
return FILE.deleteFolder(FN);
while (FILE.folderExists(FN)) {
try {
return FILE.deleteFolder(FN);
} catch (e) {
console.warn("Can not clear the session! Resaon: " + e.message);
console.warn("Retrying clear the profile...");
}
}
};
this.clear = function() {
return this.clearProfile();
};
this.setUserDataDir = function(dirname) {