Sha256: 50f5c541a10616721c710a09db7825c10af1acea5d2fc8690ddadf73e4faba71

Contents?: true

Size: 579 Bytes

Versions: 7

Compression:

Stored size: 579 Bytes

Contents

/*
 * Copyright (C) the libgit2 contributors. All rights reserved.
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */
#include <git2/common.h>

#ifdef __OpenBSD__

#include <limits.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>

char *p_realpath(const char *pathname, char *resolved)
{
	char *ret;

	if ((ret = realpath(pathname, resolved)) == NULL)
		return NULL;

	/* Figure out if the file exists */
	if (!access(ret, F_OK))
		return ret;

	return NULL;
}

#endif

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rugged-0.21.4 vendor/libgit2/src/unix/realpath.c
rugged-0.21.3 vendor/libgit2/src/unix/realpath.c
rugged-0.21.2 vendor/libgit2/src/unix/realpath.c
rugged-0.21.0 vendor/libgit2/src/unix/realpath.c
rugged-0.19.0 vendor/libgit2/src/unix/realpath.c
rugged-0.18.0.gh.de28323 vendor/libgit2/src/unix/realpath.c
rugged-0.18.0.b1 vendor/libgit2/src/unix/realpath.c