mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
d384d15510
commit
f1deefd73b
@ -277,27 +277,29 @@ static bool AddSubmittedReport(const string& serverResponse)
|
||||
string path = submittedDir + UI_DIR_SEPARATOR +
|
||||
responseItems["CrashID"] + ".txt";
|
||||
|
||||
ofstream file(path.c_str());
|
||||
if (!file.is_open())
|
||||
ofstream* file = UIOpenWrite(path);
|
||||
if (!file->is_open()) {
|
||||
delete file;
|
||||
return false;
|
||||
}
|
||||
|
||||
char buf[1024];
|
||||
UI_SNPRINTF(buf, 1024,
|
||||
gStrings["CrashID"].c_str(),
|
||||
responseItems["CrashID"].c_str());
|
||||
file << buf << "\n";
|
||||
*file << buf << "\n";
|
||||
|
||||
if (responseItems.find("ViewURL") != responseItems.end()) {
|
||||
UI_SNPRINTF(buf, 1024,
|
||||
gStrings["CrashDetailsURL"].c_str(),
|
||||
responseItems["ViewURL"].c_str());
|
||||
file << buf << "\n";
|
||||
*file << buf << "\n";
|
||||
}
|
||||
|
||||
file.close();
|
||||
file->close();
|
||||
delete file;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
bool SendCompleted(bool success, const string& serverResponse)
|
||||
|
Loading…
Reference in New Issue
Block a user