Bug 517404: Create the Crash Reporter/submitted/ directory if it doesn't already exist. r=ted

This commit is contained in:
Chris Jones 2010-03-24 16:21:56 -05:00
parent 88364a23e9
commit fd6d337267

View file

@ -166,6 +166,8 @@ function writeSubmittedReport(crashID, viewURL) {
let reportFile = directoryService.get("UAppData", Ci.nsIFile);
reportFile.append("Crash Reports");
reportFile.append("submitted");
if (!reportFile.exists())
reportFile.create(Ci.nsIFile.DIRECTORY_TYPE, 0700);
reportFile.append(crashID + ".txt");
var fstream = Cc["@mozilla.org/network/file-output-stream;1"].
createInstance(Ci.nsIFileOutputStream);