Backout 815b5a243315 (bug 781213) for xpcshell failures

This commit is contained in:
Ed Morley 2012-09-13 15:23:53 +01:00
parent 7bf4cedb77
commit 012591bf65

View File

@ -868,12 +868,14 @@ TelemetryPing.prototype = {
let profileDirectory = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
let directory = profileDirectory.clone();
directory.append("saved-telemetry-pings");
if (directory.isDirectory()) {
return directory;
} else {
try {
if (directory.exists()) {
if (directory.isDirectory()) {
// We used to wrongly create the directory with mode 0600.
// Fix that.
directory.permissions = RWX_OWNER;
return directory;
} else {
directory.remove(true);
} catch (e) {
}
}