From 8702ce8bbd4d1435cc81fa8fcd7f5309d3c7b003 Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Tue, 18 Sep 2018 19:18:01 +0300 Subject: VC and secret dir are now stored with absolute path --- src/ckutil.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ckutil.c') diff --git a/src/ckutil.c b/src/ckutil.c index 74a6b00..880696b 100644 --- a/src/ckutil.c +++ b/src/ckutil.c @@ -10,6 +10,7 @@ * -------------------------------------------------------------------------- */ #include #include +#include #include #include #include @@ -39,11 +40,14 @@ void util_replace_slash_with_uscore(char *s) { } } -int util_file_exists(const char* path) { +int util_file_exists(const char* path, char *absPath) { struct stat st = {0}; if (stat(path, &st) == -1) { return 0; } + if (absPath != NULL) { + realpath(path, absPath); + } return 1; } -- cgit v1.2.3