Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: yesno on February 25, 2010, 12:39:38 pm

Title: Small bug with build log
Post by: yesno on February 25, 2010, 12:39:38 pm
Hi,

there is a small problem/bug: after I have built somewhat, I get the message "Build log saved as:" and a filename where I can click to open the file.
But my OS is Windows, the path separators are backslashes and the backslashes are replaced by the sequence "%5c", so my browser gets confused and doesn't open the file.
Code
Build log saved as: 
file://C:%5cSRC-Extern%5cmysql-4.0.12%5clibmysql%5clibmySQL_build_log.html

After I had applied this patch
Code
Index: compilergcc.cpp
===================================================================
--- compilergcc.cpp (Revision 6178)
+++ compilergcc.cpp (Arbeitskopie)
@@ -3624,7 +3624,9 @@
     f.Write(_T("</html>\n"));
 
     Manager::Get()->GetLogManager()->Log(_("Build log saved as: "), m_PageIndex);
-    wxURI tmpFilename = m_BuildLogFilename;
+    wxString tempBuildLogFilename=m_BuildLogFilename;
+    tempBuildLogFilename.Replace(_("\\"),_("/"));
+    wxURI tmpFilename = tempBuildLogFilename;
 
     #if wxCHECK_VERSION(2, 9, 0)
     Manager::Get()->GetLogManager()->Log(F(_T("file://%s"), tmpFilename.BuildURI().wx_str()), m_PageIndex, Logger::warning);
the output looked like this
Code
Build log saved as: 
file://C:/SRC-Extern/mysql-4.0.12/libmysql/libmySQL_build_log.html
and my browser could open the file

Hope this patch doesn't confuse other operating systems.

With kind regards

yesno
Title: Re: Small bug with build log
Post by: MortenMacFly on February 25, 2010, 03:09:50 pm
replaced by the sequence "%5c", so my browser gets confused and doesn't open the file.
What browser do you have? Because this is perfectly valid to my knowledge...?! :shock:

Edit: Wait a sec... %5c is the backslash, bot the forward slash, right? Then forget what I said.