Sha256: ebe5bde985b8e97698eceb4f99999031e46ce19290262c1dbd7198764f3a3a6a

Contents?: true

Size: 655 Bytes

Versions: 4

Compression:

Stored size: 655 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"

#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

4 entries across 4 versions & 1 rubygems

Version Path
rugged-1.4.5 vendor/libgit2/src/unix/realpath.c
rugged-1.4.4 vendor/libgit2/src/unix/realpath.c
rugged-1.4.3 vendor/libgit2/src/unix/realpath.c
rugged-1.4.2 vendor/libgit2/src/unix/realpath.c