mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1001948 - Attempt to remove files more than once in the Windows cleanup functions in toolkit/webapps/ tests. r=myk,Yoric,tabraldes
This commit is contained in:
parent
4402335aba
commit
2ac1a1eda2
@ -737,6 +737,7 @@ static const dom::ConstantSpec gWinProperties[] =
|
||||
INT_CONSTANT(DACL_SECURITY_INFORMATION),
|
||||
|
||||
// Errors
|
||||
INT_CONSTANT(ERROR_SUCCESS),
|
||||
INT_CONSTANT(ERROR_INVALID_HANDLE),
|
||||
INT_CONSTANT(ERROR_ACCESS_DENIED),
|
||||
INT_CONSTANT(ERROR_DIR_NOT_EMPTY),
|
||||
@ -746,6 +747,7 @@ static const dom::ConstantSpec gWinProperties[] =
|
||||
INT_CONSTANT(ERROR_NO_MORE_FILES),
|
||||
INT_CONSTANT(ERROR_PATH_NOT_FOUND),
|
||||
INT_CONSTANT(ERROR_BAD_ARGUMENTS),
|
||||
INT_CONSTANT(ERROR_SHARING_VIOLATION),
|
||||
INT_CONSTANT(ERROR_NOT_SUPPORTED),
|
||||
|
||||
PROP_END
|
||||
|
@ -117,10 +117,22 @@ if (LINUX) {
|
||||
yield OS.File.removeDir(profileDir.parent.parent.path, { ignoreAbsent: true });
|
||||
}
|
||||
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
let removed = false;
|
||||
do {
|
||||
try {
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
|
||||
removed = true;
|
||||
} catch (ex if ex instanceof OS.File.Error &&
|
||||
(ex.winLastError == OS.Constants.Win.ERROR_SUCCESS ||
|
||||
ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION)) {
|
||||
// Wait 100 ms before attempting to remove again.
|
||||
yield wait(100);
|
||||
}
|
||||
} while (!removed);
|
||||
});
|
||||
};
|
||||
} else if (MAC) {
|
||||
|
@ -117,10 +117,22 @@ if (LINUX) {
|
||||
yield OS.File.removeDir(profileDir.parent.parent.path, { ignoreAbsent: true });
|
||||
}
|
||||
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
let removed = false;
|
||||
do {
|
||||
try {
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
|
||||
removed = true;
|
||||
} catch (ex if ex instanceof OS.File.Error &&
|
||||
(ex.winLastError == OS.Constants.Win.ERROR_SUCCESS ||
|
||||
ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION)) {
|
||||
// Wait 100 ms before attempting to remove again.
|
||||
yield wait(100);
|
||||
}
|
||||
} while (!removed);
|
||||
});
|
||||
};
|
||||
} else if (MAC) {
|
||||
|
@ -122,10 +122,22 @@ if (LINUX) {
|
||||
yield OS.File.removeDir(profileDir.parent.parent.path, { ignoreAbsent: true });
|
||||
}
|
||||
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
let removed = false;
|
||||
do {
|
||||
try {
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
|
||||
removed = true;
|
||||
} catch (ex if ex instanceof OS.File.Error &&
|
||||
(ex.winLastError == OS.Constants.Win.ERROR_SUCCESS ||
|
||||
ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION)) {
|
||||
// Wait 100 ms before attempting to remove again.
|
||||
yield wait(100);
|
||||
}
|
||||
} while (!removed);
|
||||
});
|
||||
};
|
||||
} else if (MAC) {
|
||||
|
@ -127,10 +127,22 @@ if (LINUX) {
|
||||
yield OS.File.removeDir(profileDir.parent.parent.path, { ignoreAbsent: true });
|
||||
}
|
||||
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
let removed = false;
|
||||
do {
|
||||
try {
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
|
||||
removed = true;
|
||||
} catch (ex if ex instanceof OS.File.Error &&
|
||||
(ex.winLastError == OS.Constants.Win.ERROR_SUCCESS ||
|
||||
ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION)) {
|
||||
// Wait 100 ms before attempting to remove again.
|
||||
yield wait(100);
|
||||
}
|
||||
} while (!removed);
|
||||
});
|
||||
};
|
||||
} else if (MAC) {
|
||||
|
@ -127,10 +127,22 @@ if (LINUX) {
|
||||
yield OS.File.removeDir(profileDir.parent.parent.path, { ignoreAbsent: true });
|
||||
}
|
||||
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
let removed = false;
|
||||
do {
|
||||
try {
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
|
||||
removed = true;
|
||||
} catch (ex if ex instanceof OS.File.Error &&
|
||||
(ex.winLastError == OS.Constants.Win.ERROR_SUCCESS ||
|
||||
ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION)) {
|
||||
// Wait 100 ms before attempting to remove again.
|
||||
yield wait(100);
|
||||
}
|
||||
} while (!removed);
|
||||
});
|
||||
};
|
||||
} else if (MAC) {
|
||||
|
@ -135,10 +135,22 @@ if (LINUX) {
|
||||
yield OS.File.removeDir(profileDir.parent.parent.path, { ignoreAbsent: true });
|
||||
}
|
||||
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
let removed = false;
|
||||
do {
|
||||
try {
|
||||
yield OS.File.removeDir(installPath, { ignoreAbsent: true });
|
||||
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(desktopShortcut, { ignoreAbsent: true });
|
||||
yield OS.File.remove(startMenuShortcut, { ignoreAbsent: true });
|
||||
|
||||
removed = true;
|
||||
} catch (ex if ex instanceof OS.File.Error &&
|
||||
(ex.winLastError == OS.Constants.Win.ERROR_SUCCESS ||
|
||||
ex.winLastError == OS.Constants.Win.ERROR_SHARING_VIOLATION)) {
|
||||
// Wait 100 ms before attempting to remove again.
|
||||
yield wait(100);
|
||||
}
|
||||
} while (!removed);
|
||||
});
|
||||
};
|
||||
} else if (MAC) {
|
||||
|
Loading…
Reference in New Issue
Block a user