[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] fixed typo in previous patch to misc.c
From: |
Paul Eggert |
Subject: |
[Bug-tar] fixed typo in previous patch to misc.c |
Date: |
Tue, 17 May 2005 01:35:56 -0700 |
I installed the following. Sorry about the typo that I introduced.
2005-05-17 Paul Eggert <address@hidden>
* 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:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-tar] fixed typo in previous patch to misc.c,
Paul Eggert <=