Subject: gnu/libexec/uucp/libunix/mkdirs.c edge case
To: None <current-users@NetBSD.ORG>
From: D'Arcy J.M. Cain <darcy@druid.com>
List: current-users
Date: 11/21/1996 07:30:47
This fixes an edge case when copying the directory name.
*** ../src.original/./gnu/libexec/uucp/libunix/mkdirs.c Mon Nov 18 18:01:18 1996
--- ./gnu/libexec/uucp/libunix/mkdirs.c Fri Aug 25 03:24:20 1995
***************
*** 28,38 ****
{
if (*z == '/' && z != zcopy)
{
- /* Some versions of uuto will send a double slash. Some
- systems will fail to create a directory ending in a
- slash. */
- if (z[-1] == '/')
- continue;
*z = '\0';
if (mkdir (zcopy, imode) != 0
&& errno != EEXIST
--- 28,33 ----
***************
*** 48,53 ****
--- 43,53 ----
return FALSE;
}
*z = '/';
+ /* Some versions of uuto will send a double slash. Some
+ systems will fail to create a directory ending in a
+ slash. */
+ while (z[1] == '/')
+ z++;
}
}
--
D'Arcy J.M. Cain | Democracy is three wolves
darcy@{druid.com|vex.net} | and a sheep voting on
+1 416 943 5281 (DoD#0082) (eNTP) | what's for dinner.
-- http://www.druid.com/darcy --