Article View: gnu.utils.bug
Article #653GNU fileutils v3.2.3 alter pathnames by removing trailing slashes
From: gnu
Date: Fri, 14 Aug 1992 05:45
Date: Fri, 14 Aug 1992 05:45
34 lines
1960 bytes
1960 bytes
The file utilities (cp, mv, etc) eliminate some errors by always removing trailing slashes from file names. However, these errors should be caught,` not ignored. For example, in the command: cp foo bar/ the intention of the user is that if "bar" is a directory, the file bar/foo is created. But if "bar" is not a directory, rather than producing a copy of foo called "bar", an error should be produced. This is a simple way to protect yourself against typos in copying files into directories. Instead, the GNU fileutils produce a file called "bar", without any warning or error. My guess is that somebody tried using the GNU fileutils under "bash" with filename completion, and had some minor problem because bash inserts a / at the end of a path if the last part of the name is a directory. (Some part of the fileutils probably assumed that there would be no trailing slashes in names.) The Unix kernel properly handles names containing multiple leading, internal, and trailing slashes. The Unix file utilities also handle these pathnames. We pride ourselves on doing better in the GNU system than in the Unix system -- removing limitations, and doing better error checking. If a user specifies a pathname which cannot be resolved, an error should be reported. The fix is not indiscriminate bashing of trailing slashes, as currently implemented. The fix is to remove the generic truncation of trailing slashes, then to fix whatever minor bugs prevent the use of pathnames containing trailing slashes. John Gilmore
Technical Details
Message-ID:
<9208141945.AA04108@cygnus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!gnuShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!gnu From: gnu@cygnus.com Subject: GNU fileutils v3.2.3 alter pathnames by removing trailing slashes Message-ID: <9208141945.AA04108@cygnus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 14 Aug 1992 05:45:45 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 35