User forums > Using Code::Blocks
How to stop ALL types of file overwriting?
rcoll:
--- Quote from: PaulS on April 09, 2009, 02:46:14 pm ---The last Borland C++ IDE that I used managed to compile without overwriting the user's files.
--- End quote ---
The Borland IDE was dedicated to use only the Borland compiler, so compiling from a copy in memory was not a big issue for them. The C::B IDE is capable of using almost any compiler; since not all compilers can compile from memory, the file has to be written out somewhere for the (unknown) compiler to find it.
Ringo
thomas:
Well, we could of course save everything to a temporary directory and compile from there, but it would make everything a lot more complex. For example, compiler errors would have to be mapped from tempfile names to real names. The actual benefit of not saving files is rather small compared to the added complexity and error-proneness.
Usually one would want one's work to be persistent, and saving to disk is the usual way to gain persistence.
Also do note that copying everything to a temp directory may easily take 20-30 seconds for some projects.
PaulS:
Certainly true on the time overhead for large projects. I wasn't think of that. Mine a mostly less than a dozen smallish files. I have adapted to CodeBlocks ways and just make a manual copy when I don't think that a commit is appropriate. Still, it was nice.
Navigation
[0] Message Index
[*] Previous page
Go to full version