unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 3267a967656b7863c9f1ff6a820780bbfa769c10 528 bytes (raw)
name: util/path-util.c 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#define _GNU_SOURCE

#include "path-util.h"

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


char *
notmuch_canonicalize_file_name (const char *path)
{
#if HAVE_CANONICALIZE_FILE_NAME
    return canonicalize_file_name (path);
#elif defined(PATH_MAX)
    char *resolved_path =  malloc (PATH_MAX + 1);
    if (resolved_path == NULL)
	return NULL;

    return realpath (path, resolved_path);
#else
#error undefined PATH_MAX _and_ missing canonicalize_file_name not supported
#endif
}

debug log:

solving 3267a967 ...
found 3267a967 in https://yhetil.org/notmuch.git/

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).