Package: coreutils
Version: 8.5-1
Severity: minor
The rm(1) is little too simplistic to assume that trailing "/" is automatically
a directory:
$ ls -l
lrwxrwxrwx 1 foo foo 15 Aug 12 10:53 monitor -> tmp/bug/monitor
$ rm monitor/
rm: cannot remove `monitor/': Is a directory
Whereas:
$ rm monitor
<no messages>
SUGGESTION
Please do a "unlink" regardless of checking if there is trailing slash
or not in the command line item string. If the unlink fails, then
return the error to the user.[*]
[*] there is no need to check "stat" either to verify that item is
non-directory as the error code of "unlink" would automatically notify
if the operation succeeds or not.
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages coreutils depends on:
ii libacl1 2.2.51-3 Access control list shared library
ii libattr1 1:2.4.46-3 Extended attribute shared library
ii libc6 2.13-10 Embedded GNU C Library: Shared lib
ii libselinux1 2.0.98-1.1 SELinux runtime shared libraries
coreutils recommends no packages.
coreutils suggests no packages.
-- debconf-show failed
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]