[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix a nit in getcwd-path-max.m4
From: |
Jim Meyering |
Subject: |
fix a nit in getcwd-path-max.m4 |
Date: |
Sun, 18 Jun 2006 16:36:46 +0200 |
There was a bug in the cleanup code for gl_FUNC_GETCWD_PATH_MAX.
But it doesn't really matter, since it's probably never been
triggered, and the driving shell script also removes the hierarchy.
This would matter only if a preceding mkdir succeeded,
but the immediately following chdir-into-new-directory failed.
Not likely.
2006-06-18 Jim Meyering <address@hidden>
* getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
Low-probability clean-up should be to use rmdir to get rid of
the just-created directory, not unlink.
Index: m4/getcwd-path-max.m4
===================================================================
RCS file: /fetish/cu/m4/getcwd-path-max.m4,v
retrieving revision 1.19
diff -u -p -r1.19 getcwd-path-max.m4
--- m4/getcwd-path-max.m4 24 Apr 2006 17:50:24 -0000 1.19
+++ m4/getcwd-path-max.m4 18 Jun 2006 14:27:06 -0000
@@ -1,4 +1,4 @@
-#serial 11
+#serial 12
# Check for several getcwd bugs with long file names.
# If so, arrange to compile the wrapper function.
@@ -157,8 +157,8 @@ main ()
{
size_t i;
- /* Unlink first, in case the chdir failed. */
- unlink (DIR_NAME);
+ /* Try rmdir first, in case the chdir failed. */
+ rmdir (DIR_NAME);
for (i = 0; i <= n_chdirs; i++)
{
if (chdir ("..") < 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fix a nit in getcwd-path-max.m4,
Jim Meyering <=