blob: bf0de1c22a02f326e88ae336a5018c586666d9f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$NetBSD: patch-ac,v 1.1 2000/12/16 01:58:01 wiz Exp $
--- src/unix_files.c.orig Sat Sep 2 11:43:03 2000
+++ src/unix_files.c
@@ -286,6 +286,12 @@
repv
rep_make_directory(repv dir)
{
+ int len = rep_STRING_LEN(dir);
+
+ /* Trim trailing '/' to mkdir(2) since some OSes fail the call otherwise */
+ if (*(rep_STR(dir) + len - 1) == '/')
+ dir = rep_string_dupn(rep_STR(dir), len - 1);
+
if(mkdir(rep_STR(dir), S_IRWXU | S_IRWXG | S_IRWXO) == 0)
return Qt;
else
|