diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2005-10-04 18:39:58 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2005-10-04 18:39:58 +0000 |
commit | 7220d7637f6dfcc3e4b70bdecff8cfce67f4dd08 (patch) | |
tree | 4b17d7034fbc6c6f2b893eb6b3ea28eef7cf78b0 /usr.bin/lndir | |
parent | 09bb9ffe047b82c4b29ba323d9d7cb93f378becb (diff) |
ignore the .#* files left over by cvs (and emacs). ok deraadt@, jmc@.
Diffstat (limited to 'usr.bin/lndir')
-rw-r--r-- | usr.bin/lndir/lndir.1 | 5 | ||||
-rw-r--r-- | usr.bin/lndir/lndir.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/lndir/lndir.1 b/usr.bin/lndir/lndir.1 index 6be65dacf2e..3674b151108 100644 --- a/usr.bin/lndir/lndir.1 +++ b/usr.bin/lndir/lndir.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: lndir.1,v 1.18 2003/06/03 21:09:02 deraadt Exp $ +.\" $OpenBSD: lndir.1,v 1.19 2005/10/04 18:39:57 matthieu Exp $ .\" .\" Copyright (c) 1997, Jason Downs. All rights reserved. .\" @@ -103,7 +103,8 @@ and is relative to (not the current directory). .Pp .\" CVS.adm is used by the Concurrent Versions System. -Note that RCS, SCCS, CVS and CVS.adm directories are not shadowed, in +Note that files whose names end in '~' or start with '.#' and +RCS, SCCS, CVS and CVS.adm directories are not shadowed, in addition to any specified on the command line with .Fl e arguments. diff --git a/usr.bin/lndir/lndir.c b/usr.bin/lndir/lndir.c index 498373e6723..0ab2472df6c 100644 --- a/usr.bin/lndir/lndir.c +++ b/usr.bin/lndir/lndir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lndir.c,v 1.15 2004/06/29 17:02:18 mickey Exp $ */ +/* $OpenBSD: lndir.c,v 1.16 2005/10/04 18:39:57 matthieu Exp $ */ /* $XConsortium: lndir.c /main/15 1995/08/30 10:56:18 gildea $ */ /* @@ -207,7 +207,8 @@ dodir(char *fn, struct stat *fs, struct stat *ts, int rel) *p++ = '/'; n_dirs = fs->st_nlink; while ((dp = readdir(df))) { - if (dp->d_namlen == 0 || dp->d_name[dp->d_namlen - 1] == '~') + if (dp->d_namlen == 0 || dp->d_name[dp->d_namlen - 1] == '~' || + strncmp(dp->d_name, ".#", 2) == 0) continue; for (cur = exceptions; cur != NULL; cur = cur->next) { if (!strcmp(dp->d_name, cur->name)) |