Mercurial > hg > octave-shane > gnulib-hg
annotate modules/unitypes @ 17074:d4ccb0388f18
fts: reduce two or more trailing slashes to just one, usually
* lib/fts.c (fts_open): Upon initialization, if a name ends in two
or more slashes, trim all but the final one. But if a name consists
solely of two slashes, don't modify it. If it consists solely of
three or more slashes, strip all but one.
This is part of the solution to a minor problem with rm:
it would print a bogus ELOOP diagnostic when failing to remove
the slash-decorated name of a symlink-to-directory:
$ mkdir d && ln -s d s && env rm -r s/
rm: cannot remove 's': Too many levels of symbolic links
With the change below and a trivial don't-trim-trailing-slashes
adjustment to remove.c, it does this:
$ env rm -r s/
rm: cannot remove 's/': Not a directory
Improved by: Eric Blake
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Tue, 04 Sep 2012 11:36:38 +0200 |
parents | aca88fcb0493 |
children | 8636d98120a9 |
rev | line source |
---|---|
7791
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 Description: |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
2 Base types for Unicode string functions. |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 Files: |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
5 lib/unitypes.in.h |
13442
2d4854871087
unitypes: Fix bug introduced on 2010-05-18.
Ian Beckwith <ianb@erislabs.net>
parents:
13354
diff
changeset
|
6 m4/libunistring-base.m4 |
7791
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 Depends-on: |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 stdint |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 configure.ac: |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
12 gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h]) |
7791
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 Makefile.am: |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
15 BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
16 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
17 unitypes.h: unitypes.in.h |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
18 $(AM_V_GEN)rm -f $@-t $@ && \ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
19 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
20 cat $(srcdir)/unitypes.in.h; \ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
21 } > $@-t && \ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
22 mv -f $@-t $@ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
7791
diff
changeset
|
23 MOSTLYCLEANFILES += unitypes.h unitypes.h-t |
7791
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 Include: |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 "unitypes.h" |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 License: |
14504
aca88fcb0493
Relicense some modules under LGPLv2+, for libidn2.
Bruno Haible <bruno@clisp.org>
parents:
14273
diff
changeset
|
29 LGPLv2+ |
7791
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 Maintainer: |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 Bruno Haible |
dc1b4b5f8246
Basic types for Unicode strings.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 |