Eric Blake <[EMAIL PROTECTED]> writes: > Actually, I think that calling base_name should strip the trailing > slashes, similar to POSIX basename().
But if you do that, you violate this basic rule: > If you have a valid file name F, then accessing F is the same as > chdir(dir_name(F)) followed by accessing base_name(F). Furthermore > if you successfully { chdir(dir_name(F)); rename(base_name(F),"foo"); }, > you have renamed F to a file named "foo" in the same directory that F was > in. If a/b is a symbolic link to a directory, then a/b/ is not the same as a/b and should not be treated like it. Hence base_name shouldn't strip trailing slashes. _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib