Article View: gnu.utils.bug
Article #661Re: GNU fileutils v3.2.3 alter pathnames by removing trailing slashes
From: Thomas M. Breuel
Date: Thu, 27 Aug 1992 21:49
Date: Thu, 27 Aug 1992 21:49
28 lines
1599 bytes
1599 bytes
|I still don't see the problem with having mv etc. simply
|check if the purported directory with the trailing slash
|actually *is* a directory before it removes it. It seems
|to me that makes the original poster happy, because he gets
|error messages when he erroneously types
|mv foo bar/
|where bar is not a directory; it makes me happy, because the
|slashes that the completion functions continue to work
|properly with the GNU file utilities; and it requires no
|new options, environment variables, or other such things.
It's the principle that's wrong. I don't expect file utilities to go
around munging path names.
You don't know what those "/" (or paths) might mean to the kernel, to a
remote or user-defined file system, or to the user, so I think it just
isn't safe to remove them.
If you do want to have this option, I think it should be an option
that users should have to configure explicitly, e.g., by setting
the environment variable "GNU_MUNGE_PATHNAMES"; I suspect that
all that would be required would the the addition of
{char *s; if(!((s=getenv("GNU_MUNGE_PATHNAMES"))&&atoi(s))) return;}
in one or two strategic places.
Thomas.
Technical Details
Message-ID:
<9208271749.AA21134@idiap.ch>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!idiap.CH!tmbShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!idiap.CH!tmb From: tmb@idiap.CH (Thomas M. Breuel) Subject: Re: GNU fileutils v3.2.3 alter pathnames by removing trailing slashes Message-ID: <9208271749.AA21134@idiap.ch> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 27 Aug 1992 21:49:28 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 29