summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-03 01:33:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-03 01:33:48 +0000
commit885cb809497f1c443798ad4b40f7d060ec8954c1 (patch)
tree31a2db947b118e1222253345b356dea8de5f82e8 /gnu
parentb35dc192de78f6dd9bcea794840345a66b03efd7 (diff)
handle "/*" path parsing correctly; netbsd pr#2970, darcey@druid.com
Diffstat (limited to 'gnu')
-rw-r--r--gnu/libexec/uucp/libunix/mkdirs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gnu/libexec/uucp/libunix/mkdirs.c b/gnu/libexec/uucp/libunix/mkdirs.c
index df4f98707f9..26307a88265 100644
--- a/gnu/libexec/uucp/libunix/mkdirs.c
+++ b/gnu/libexec/uucp/libunix/mkdirs.c
@@ -28,11 +28,6 @@ fsysdep_make_dirs (zfile, fpublic)
{
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
@@ -48,6 +43,11 @@ fsysdep_make_dirs (zfile, fpublic)
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++;
}
}