[SAGA-RG] Some more questions
Andre Merzky
andre at merzky.net
Wed Oct 31 09:29:40 CDT 2007
Cool. I clarify that in the spec
Cheers, Andre.
Quoting [Ceriel Jacobs] (Oct 31 2007):
> From: Ceriel Jacobs <ceriel at cs.vu.nl>
> To: Andre Merzky <andre at merzky.net>
> CC: Hartmut Kaiser <hkaiser at cct.lsu.edu>, 'Roelof Kemp' <rkemp at cs.vu.nl>,
> saga-rg at ogf.org
> Subject: Re: [SAGA-RG] Some more questions
>
> 'Andre Merzky' wrote:
> >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).
>
> OK, I thought about this now. Here is My opinion:
> I agree with Hartmut: throw an AlreadyExists exception, with a
> clarifying message, like "cannot overwrite non-directory `b' with directory
> `a'".
> I agree that deleting the file is a bad idea. If the user wants this,
> he/she should remove the file first.
>
> Ceriel
>
--
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