Fix PR 46068 using the patch by Nicolas Thauvin:
pkg_add fails to install a package when subdiretories are missing in the path to package directory in /var/db/pkg.
This commit is contained in:
parent
72c3d36532
commit
8f4a85152a
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: perform.c,v 1.101 2012/01/28 12:33:04 joerg Exp $ */
|
||||
/* $NetBSD: perform.c,v 1.102 2012/02/21 13:32:24 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.101 2012/01/28 12:33:04 joerg Exp $");
|
||||
__RCSID("$NetBSD: perform.c,v 1.102 2012/02/21 13:32:24 wiz Exp $");
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue