Sha256: 6c7920952c1dd61582dd2c28fe6a790f367934484d80bd35d44f003b2b6d33bc

Contents?: true

Size: 659 Bytes

Versions: 56

Compression:

Stored size: 659 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>

#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

56 entries across 56 versions & 1 rubygems

Version Path
rugged-0.26.7 vendor/libgit2/src/unix/realpath.c
rugged-0.26.6 vendor/libgit2/src/unix/realpath.c
rugged-0.26.3 vendor/libgit2/src/unix/realpath.c
rugged-0.26.0 vendor/libgit2/src/unix/realpath.c
rugged-0.26.0b5 vendor/libgit2/src/unix/realpath.c
rugged-0.26.0b4 vendor/libgit2/src/unix/realpath.c
rugged-0.26.0b3 vendor/libgit2/src/unix/realpath.c
rugged-0.26.0b2 vendor/libgit2/src/unix/realpath.c
rugged-0.26.0b1 vendor/libgit2/src/unix/realpath.c
rugged-0.25.1.1 vendor/libgit2/src/unix/realpath.c
rugged-0.24.6.1 vendor/libgit2/src/unix/realpath.c
rugged-0.25.1 vendor/libgit2/src/unix/realpath.c
rugged-0.24.5 vendor/libgit2/src/unix/realpath.c
rugged-0.25.0 vendor/libgit2/src/unix/realpath.c
rugged-0.25.0b10 vendor/libgit2/src/unix/realpath.c
rugged-0.25.0b9 vendor/libgit2/src/unix/realpath.c
rugged-0.25.0b8 vendor/libgit2/src/unix/realpath.c
rugged-0.25.0b7 vendor/libgit2/src/unix/realpath.c
rugged-0.25.0b6 vendor/libgit2/src/unix/realpath.c
rugged-0.25.0b5 vendor/libgit2/src/unix/realpath.c