Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Problematic hack in upp::Build.cpp
Problematic hack in upp::Build.cpp [message #41929] |
Fri, 07 February 2014 08:21 |
slashupp
Messages: 231 Registered: July 2009
|
Experienced Member |
|
|
In Build.cpp there is the following code:
bool MakeBuild::Build(const Workspace& wspc, String mainparam, String outfile, bool clear_console)
{
String hfile = outfile + ".xxx";
SaveFile(hfile, "");
FileTime start_time = GetFileTime(hfile); // Defensive way to get correct filetime of start
DeleteFile(hfile);
ClearErrorEditor();
BeginBuilding(true, clear_console);
...
I use a background process to automatically backup changed files
in my project-dir (See: https://github.com/slashmais/simplebup)
and some of my workfiles happen to use the extension '.xxx'.
The above code caused an empty '.xxx' backup that had me
bug-hunting my code for hours..
I'm sure there are better ways to get the needed timestamp, or
at least create a proper temporary file without this kind of
clashing, this is not a good hack at all
(I've for now changed my extension to '.x_x' but it is only a
temporary work-around)
|
|
|
Goto Forum:
Current Time: Sun May 05 23:48:48 CEST 2024
Total time taken to generate the page: 0.03110 seconds
|