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)
|
|
|
Re: Problematic hack in upp::Build.cpp [message #41962 is a reply to message #41929] |
Sat, 08 February 2014 22:13 |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
slashupp wrote on Thu, 06 February 2014 23:21 |
(I've for now changed my extension to '.x_x' but it is only a
temporary work-around)
|
Sorry it took you so much time to find the problem.
Upp has used the .xxx extension for some time.
Since a single user has a conflict is not a viable solution for a change to the Upp core code.
You can use .x_x, .xyz, your initials, etc.
If you need more options to choose from just ask.
[Updated on: Sat, 08 February 2014 22:14] Report message to a moderator
|
|
|
|
Re: Problematic hack in upp::Build.cpp [message #41966 is a reply to message #41964] |
Sun, 09 February 2014 09:32 |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
No I am not sharp enough to make much of a contribution to Upp.
The point I was trying to make is if a change needs to be made why do you expect the Upp code to be changed rather than you make the necessary changes in your code.
|
|
|
Goto Forum:
Current Time: Sat May 11 17:51:54 CEST 2024
Total time taken to generate the page: 0.03137 seconds
|