Create Executable ask before overwrite existing file

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Fredi
Enthusiast
Enthusiast
Posts: 143
Joined: Wed Jul 23, 2008 10:45 pm

Create Executable ask before overwrite existing file

Post by Fredi »

When use "Create Executable" if a file with selected file name exist in output folder then file is replaced without any confirm. Today i lost important file :cry:

Please add a question when replacing files, or add an option in PB for enable or disable that.

Thank you.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Create Executable ask before overwrite existing file

Post by PB »

> Today i lost important file

But you always back up your important files, right?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Fredi
Enthusiast
Enthusiast
Posts: 143
Joined: Wed Jul 23, 2008 10:45 pm

Create Executable ask before overwrite existing file

Post by Fredi »

Not from this file unfortunately
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

I think that there is no requester is for a good reason...

when you compile a project and discover late bugs or do some final finetuning, it can be a nuisance to click away the requester again and again.

on the other hand, there is no good reason why you should call a completely new executable exactly the same name and compile it into the same directory.

and if you ever do so - shit happenes, should teach you to organize better.


so, my Image: AGAINST
oh... and have a nice day.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

+1

But only show the requester when you checked somthing like "overwrite executables silently" in the compiler options. No big deal, should added in a couple of minutes.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Marlin
Enthusiast
Enthusiast
Posts: 406
Joined: Sun Sep 17, 2006 1:24 pm
Location: Germany

Post by Marlin »

I had a similar problem recently.

But I suggest a slightly different solution:
  • - Disable the possibility to overwrite any file that is not an executable, like the ones PB would create.
Often you overwrite your old versions of the same PB executable,
that is not something you usually want to be warned about.

Besides, if you get used to acknowledge overwriting,
your not much safer than before.

If the file to be overwriten is not a PB executable, that [allmost(?)] allways means something that should not be done!

Such a thing would happen most easily, when you're playing a lot with some SaveFileRequester in your App,
that looks exactly like the one PB uses for creating executables and you start getting [a little] tired... ;-)

However a warning about overwriting PB executables that could be disabled
additionally to my suggestion would not be bad.
Post Reply