Mailing List Archive

Folder renaming
Hello,

here's a small fix for _ic_rename(). The check that a folder is not renamed so
that it becomes a sub-folder of its own (e.g. renaming "A" to "A/B") is too
restrictive: It verifies that the old name is not a prefix of the new name,
but this also prohibits to rename "A" to "AB". The renaming is only illegal,
if the old name is a prefix of the new name _and_ a hierarchy separator "/"
immediately follows in the new name (otherwise the new name is not a
sub-folder of the old).

Regards,
Armin
Re: Folder renaming [ In reply to ]
Thanks Armin; cvs has been updated



Armin Groesslinger heeft op dinsdag, 10 jun 2003 om 18:08
(Europe/Amsterdam) het volgende geschreven:

> Hello,
>
> here's a small fix for _ic_rename(). The check that a folder is not
> renamed so
> that it becomes a sub-folder of its own (e.g. renaming "A" to "A/B")
> is too
> restrictive: It verifies that the old name is not a prefix of the new
> name,
> but this also prohibits to rename "A" to "AB". The renaming is only
> illegal,
> if the old name is a prefix of the new name _and_ a hierarchy
> separator "/"
> immediately follows in the new name (otherwise the new name is not a
> sub-folder of the old).
>
> Regards,
> Armin
> <folder_rename-fix.diff>

_________________________
R.A. Rozendaal
IC&S
T: +31 30 2322878
F: +31 30 2322305
www.ic-s.nl