зеркало из https://github.com/mozilla/gecko-dev.git
fix for unicode paths while writing out the submitted breakpad report file. b=382508, r=luser
(last patch should have been "unblock signals on the crash reporter in linux. b=385532, r=luser")
This commit is contained in:
Родитель
6cad2f63b3
Коммит
9f051b9562
|
@ -277,27 +277,29 @@ static bool AddSubmittedReport(const string& serverResponse)
|
||||||
string path = submittedDir + UI_DIR_SEPARATOR +
|
string path = submittedDir + UI_DIR_SEPARATOR +
|
||||||
responseItems["CrashID"] + ".txt";
|
responseItems["CrashID"] + ".txt";
|
||||||
|
|
||||||
ofstream file(path.c_str());
|
ofstream* file = UIOpenWrite(path);
|
||||||
if (!file.is_open())
|
if (!file->is_open()) {
|
||||||
|
delete file;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
UI_SNPRINTF(buf, 1024,
|
UI_SNPRINTF(buf, 1024,
|
||||||
gStrings["CrashID"].c_str(),
|
gStrings["CrashID"].c_str(),
|
||||||
responseItems["CrashID"].c_str());
|
responseItems["CrashID"].c_str());
|
||||||
file << buf << "\n";
|
*file << buf << "\n";
|
||||||
|
|
||||||
if (responseItems.find("ViewURL") != responseItems.end()) {
|
if (responseItems.find("ViewURL") != responseItems.end()) {
|
||||||
UI_SNPRINTF(buf, 1024,
|
UI_SNPRINTF(buf, 1024,
|
||||||
gStrings["CrashDetailsURL"].c_str(),
|
gStrings["CrashDetailsURL"].c_str(),
|
||||||
responseItems["ViewURL"].c_str());
|
responseItems["ViewURL"].c_str());
|
||||||
file << buf << "\n";
|
*file << buf << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
file.close();
|
file->close();
|
||||||
|
delete file;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SendCompleted(bool success, const string& serverResponse)
|
bool SendCompleted(bool success, const string& serverResponse)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче