Sha256: e3ed89d4139d62b8a8f37579edb1f262fa02972834603f7b00596cc88240ad2b

Contents?: true

Size: 681 Bytes

Versions: 27

Compression:

Stored size: 681 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 "common.h"

#include "git2/common.h"

#ifndef GIT_WIN32

#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;

#ifdef __OpenBSD__
	/* The OpenBSD realpath function behaves differently,
	 * figure out if the file exists */
	if (access(ret, F_OK) < 0)
		ret = NULL;
#endif
	return ret;
}

#endif

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rugged-1.3.2.3 vendor/libgit2/src/unix/realpath.c
rugged-1.3.2.1 vendor/libgit2/src/unix/realpath.c
rugged-1.3.2 vendor/libgit2/src/unix/realpath.c
rugged-1.3.1 vendor/libgit2/src/unix/realpath.c
rugged-1.3.0 vendor/libgit2/src/unix/realpath.c
rugged-1.2.0 vendor/libgit2/src/unix/realpath.c
rugged-1.1.1 vendor/libgit2/src/unix/realpath.c
rugged-1.1.0 vendor/libgit2/src/unix/realpath.c
rugged-1.0.1 vendor/libgit2/src/unix/realpath.c
rugged-0.28.5 vendor/libgit2/src/unix/realpath.c
rugged-1.0.0 vendor/libgit2/src/unix/realpath.c
rugged-0.99.0 vendor/libgit2/src/unix/realpath.c
rugged-0.27.10.1 vendor/libgit2/src/unix/realpath.c
rugged-0.28.4.1 vendor/libgit2/src/unix/realpath.c
rugged-0.28.4 vendor/libgit2/src/unix/realpath.c
rugged-0.27.10 vendor/libgit2/src/unix/realpath.c
rugged-0.28.3.1 vendor/libgit2/src/unix/realpath.c
rugged-0.27.9 vendor/libgit2/src/unix/realpath.c
rugged-0.28.2 vendor/libgit2/src/unix/realpath.c
rugged-0.28.1 vendor/libgit2/src/unix/realpath.c