Module Name: src
Committed By: wiz
Date: Tue Feb 21 13:32:45 UTC 2012
Modified Files:
src/external/bsd/pkg_install/dist/add: perform.c
Log Message:
Fix PR 46068 using the patch by Nicolas Thauvin:
pkg_add fails to install a package when subdirectories are missing
in the path to package directory in /var/db/pkg.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.19 -r1.2 src/external/bsd/pkg_install/dist/add/perform.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/pkg_install/dist/add/perform.c
diff -u src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.19 src/external/bsd/pkg_install/dist/add/perform.c:1.2
--- src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.19 Sun Feb 19 17:46:46 2012
+++ src/external/bsd/pkg_install/dist/add/perform.c Tue Feb 21 13:32:45 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.1.1.19 2012/02/19 17:46:46 tron Exp $ */
+/* $NetBSD: perform.c,v 1.2 2012/02/21 13:32:45 wiz Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -6,7 +6,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: perform.c,v 1.1.1.19 2012/02/19 17:46:46 tron Exp $");
+__RCSID("$NetBSD: perform.c,v 1.2 2012/02/21 13:32:45 wiz Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <[email protected]>
@@ -206,7 +206,7 @@ mkdir_p(const char *path)
if (mkdir(p, 0777) == -1) {
saved_errno = errno;
- if (stat(path, &sb) == 0) {
+ if (stat(p, &sb) == 0) {
if (S_ISDIR(sb.st_mode))
goto pass;
errno = ENOTDIR;