[PATCH 1/2] Save all dive computer nicknames - whether used or not

Dirk Hohndel dirk at hohndel.org
Thu Jan 24 14:35:36 PST 2013


On Thu, 2013-01-24 at 14:07 -0800, Linus Torvalds wrote:
> On Thu, Jan 24, 2013 at 1:58 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> >
> > But we'd want to make sure that the divecomputers.xml file doesn't
> > suddenly become the default filename, right?
> 
> That reminds me.
> 
> We should never have a default filename AT ALL when we load multiple
> files. It's too damn easy to screw up.

Totally agree. I was bitten by that repeatedly :-(

> Just do
> 
>     subsurface DirkDives.xml linus.xml
> 
> to look at our combined dives. The, press ^S "by mistake".
> 
> F^&%. It just saved the combined dives to "linus.xml". That's not right.

Amen.

> I'd argue that if you actually want to combine XML files, and you
> start out with multiple, you'd better use the "Save As .."
> functionality to save the result. Don't let it just overwrite the last
> one by mistake.
> 
> And yes, this has happened to me. Happily I have my dive XML file
> under revision control, but imagine the chaos if you are a normal
> person and don't do that..

Ditto.

What's the logic? If you have more than one on the command line, there's
no default name. But if you have one or none or open a file from the
menu then there is a default name and if you import others then they get
added to that file, correct?

/D



More information about the subsurface mailing list