[SAGA-RG] Some more questions
'Andre Merzky'
andre at merzky.net
Tue Oct 30 14:47:44 CDT 2007
Hi,
Quoting [Hartmut Kaiser] (Oct 30 2007):
>
> Andre,
>
> > > 2. What is supposed to happen when the source is a directory, the
> > > recursive flag is set, and the target is a file? I assume remove
> > > target, create target dir, and copy? And if overwrite flag is
> > > not set, throw AlreadyExists?
> >
> > Uhm, tough one! Unix shell would say:
> >
> > koks merzky /tmp : mkdir a
> > koks merzky /tmp : touch a/a b
> > koks merzky /tmp : cp -Rf a b
> > cp: cannot overwrite non-directory `b' with directory `a'
> >
> > We don't have an exception for this. So, yes, I would concur
> > with your interpretation: the target file should get removed,
> > and a target dir with the same name should get created.
>
> Deleting a file in the case the user wanted to delete a directory is bad,
> IMHO. I'ld suggest to throw an AlreadyExists exeption.
It would be nice to get another opinion to break the tie (I
myself am not sure which way is better).
Thanks, Andre.
--
No trees were destroyed in the sending of this message, however,
a significant number of electrons were terribly inconvenienced.
More information about the saga-rg
mailing list