<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/remove.c, branch v8.22</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.22</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.22'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2013-11-21T10:43:48Z</updated>
<entry>
<title>doc: enhance diagnostic when rm skips "." or ".." arguments</title>
<updated>2013-11-21T10:43:48Z</updated>
<author>
<name>Bernhard Voelker</name>
<email>mail@bernhard-voelker.de</email>
</author>
<published>2013-11-21T00:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2da7009d70693d830393021f2751729d06ce5551'/>
<id>urn:sha1:2da7009d70693d830393021f2751729d06ce5551</id>
<content type='text'>
The error diagnostic
  "rm: cannot remove directory: '.'"
does not give the user a hint for the reason.
Issue a clearer error message.

* src/remove.c (rm_fts): Enhance the error diagnostic in the above
case to emphasize that skipping is done deliberately.
In the corresponding comment, mention that POSIX mandates this
behavior.  Likewise in the subsequent comment for skipping "/".
* doc/coreutils.texi (rm invocation): In the paragraph describing
the above behavior, mention that POSIX mandates it.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2013-01-01T03:51:20Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2013-01-01T02:54:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=77da73c75432f3c5b4beebae7b0797a1e33160bc'/>
<id>urn:sha1:77da73c75432f3c5b4beebae7b0797a1e33160bc</id>
<content type='text'>
Run "make update-copyright", but then also run this,
  perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.
</content>
</entry>
<entry>
<title>rm: be even more careful when using a replacement errno value</title>
<updated>2012-09-19T07:44:22Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-09-19T07:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ba034fc449abd2b72ad52b3865c29fd98ea3de76'/>
<id>urn:sha1:ba034fc449abd2b72ad52b3865c29fd98ea3de76</id>
<content type='text'>
* src/remove.c (excise): The change in commit v8.19-107-gccbd3f3 made
the "rm -rf D" (for unreadable dir, D) diagnostic worse on Solaris 10:
  -rm: cannot remove 'D': Permission denied
  +rm: cannot remove 'D': File exists
That happened because unlinkat would fail with EEXIST there, given
an unreadable directory, which made the two tests, tests/rm/unread2
and tests/rm/unreadable fail.  Accommodate the EEXIST case, too.
</content>
</entry>
<entry>
<title>rm: be more careful when using a replacement errno value</title>
<updated>2012-09-05T15:31:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-09-05T14:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ccbd3f3b290cb1bbed6a91361389bb936446621c'/>
<id>urn:sha1:ccbd3f3b290cb1bbed6a91361389bb936446621c</id>
<content type='text'>
* src/remove.c (excise): Tighten the test for when we defer to an
old errno value: instead of relying solely on an FTS_DNR (unreadable
directory) failure, also test current and replacement errno values.
This change would also have solved the problem addressed by commit
v8.19-106-g57dd067.  For more info, see http://bugs.gnu.org/12339#113
</content>
</entry>
<entry>
<title>rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir</title>
<updated>2012-09-05T10:10:38Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-09-04T12:40:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=57dd06703cb89ba53d05af95c11e89a2ca51af5c'/>
<id>urn:sha1:57dd06703cb89ba53d05af95c11e89a2ca51af5c</id>
<content type='text'>
These commands would evoke an invalid diagnostic:
    $ mkdir d &amp;&amp; ln -s d s &amp;&amp; env rm -r s/
    rm: cannot remove 's': Too many levels of symbolic links
remove.c was stripping trailing slashes from "s/" before passing
the name to "rm".  But a trailing slash may change the semantics,
and thus should not be stripped.
* src/remove.c (rm_fts): Do not strip trailing slashes.
* tests/rm/v-slash.sh: Adapt to new expected output.
* gnulib: Update to latest, for an improved fts.c that merely
normalizes trailing slashes.
Reported by Paul Eggert in discussion of http://bugs.gnu.org/12339
</content>
</entry>
<entry>
<title>rm: fix the new --dir (-d) option to work with -i</title>
<updated>2012-08-23T18:53:04Z</updated>
<author>
<name>Rob Day</name>
<email>robertkday@gmail.com</email>
</author>
<published>2012-08-22T22:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dd22da8e9539cc88193987b6997769ae4ede2b15'/>
<id>urn:sha1:dd22da8e9539cc88193987b6997769ae4ede2b15</id>
<content type='text'>
* src/remove.c (prompt): Hoist the computation of is_empty, since we'll
need it slightly earlier.
Before, this function would arrange to fail with EISDIR when processing
a directory without --recursive (-r).  Adjust the condition to exempt
an empty directory when --dir has been specified.
Improve comments.
* tests/rm/d-3: New file, to ensure that rm -d -i dir works.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
* THANKS.in: Update.
Reported by Michael Price in http://bugs.gnu.org/12260
</content>
</entry>
<entry>
<title>maint: fix comment grammar to placate make syntax-check</title>
<updated>2012-08-16T17:25:40Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-08-16T17:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f1a03de07f568d4ba441712c2d7b10ff50ad444b'/>
<id>urn:sha1:f1a03de07f568d4ba441712c2d7b10ff50ad444b</id>
<content type='text'>
* src/remove.c (rm_fts): s/can not/cannot/
</content>
</entry>
<entry>
<title>rm: new option --dir (-d) to remove empty directories</title>
<updated>2012-08-14T16:54:16Z</updated>
<author>
<name>Krzysztof Goj</name>
<email>krzysztof.goj@gmail.com</email>
</author>
<published>2012-01-22T00:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=fdc2da7165d93c8065365999341173ad2a818833'/>
<id>urn:sha1:fdc2da7165d93c8065365999341173ad2a818833</id>
<content type='text'>
Add new option to rm (-d/--dir), which allows removal of
empty directories, while still safely disallowing removal
of non-empty ones.

This improves compatibility with Mac OS X and BSD systems,
which honor the -d option.

* src/remove.c (rm_fts): Remove empty directories when requested.
* src/remove.h (rm_options) [remove_empty_directories]: New member.
* src/rm.c (long_opts, usage, main): Update usage and option parsing.
(rm_option_init): Initialize the new member.
* src/mv.c (rm_option_init): Initialize the new member.
* tests/rm/d-1: New test case - successfully delete empty dir.
* tests/rm/d-2: New test case - refuse to delete nonempty dir.
* tests/Makefile.am (TESTS): Add them.
</content>
</entry>
<entry>
<title>maint: rm: remove two more unused static inline functions</title>
<updated>2012-07-20T15:31:40Z</updated>
<author>
<name>Joachim Schmitz</name>
<email>jojo@schmitz-digital.de</email>
</author>
<published>2012-07-20T13:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f24bf0448e88321a01fad18ded110fbb1545ca15'/>
<id>urn:sha1:f24bf0448e88321a01fad18ded110fbb1545ca15</id>
<content type='text'>
* src/remove.c (cache_stat_ok, is_nondir_lstat): Remove unused
functions.
</content>
</entry>
<entry>
<title>maint: rm: remove unused static-inlined functions</title>
<updated>2012-07-20T13:05:38Z</updated>
<author>
<name>Joachim Schmitz</name>
<email>jojo@schmitz-digital.de</email>
</author>
<published>2012-07-20T12:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=05364ffe0d057ac0fbd1d3f2d556132e799ce4e0'/>
<id>urn:sha1:05364ffe0d057ac0fbd1d3f2d556132e799ce4e0</id>
<content type='text'>
* src/remove.c (cache_statted, is_dir_lstat): Remove unused
static-inlined functions.
* THANKS.in: Remove my name from this list, now that (with this
commit) it is included automatically.
Copyright-paperwork-exempt: Yes
</content>
</entry>
</feed>
