Author Topic: Small bug with build log  (Read 3591 times)

Offline yesno

  • Multiple posting newcomer
  • *
  • Posts: 19
Small bug with build log
« 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Small bug with build log
« Reply #1 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.
« Last Edit: February 25, 2010, 03:14:42 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ