I installed the following. Sorry about the typo that I introduced.
2005-05-17 Paul Eggert <[EMAIL PROTECTED]>
* src/misc.c (remove_any_file): Fix typo in previous change.
--- misc.c 15 May 2005 06:23:49 -0000 1.29
+++ misc.c 17 May 2005 08:34:03 -0000 1.30
@@ -272,7 +272,9 @@ remove_any_file (const char *file_name,
/* Try unlink first if we cannot unlink directories, as this saves
us a system call in the common case where we're removing a
non-directory. */
- if (cannot_unlink_dir ())
+ bool try_unlink_first = cannot_unlink_dir ();
+
+ if (try_unlink_first)
{
if (unlink (file_name) == 0)
return 1;
@@ -290,7 +292,7 @@ remove_any_file (const char *file_name,
switch (errno)
{
case ENOTDIR:
- return cannot_unlink_dir () && unlink (file_name) == 0;
+ return !try_unlink_first && unlink (file_name) == 0;
case 0:
case EEXIST:
_______________________________________________
Bug-tar mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-tar