aboutsummaryrefslogtreecommitdiffstats
path: root/src/ckutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ckutil.c')
-rw-r--r--src/ckutil.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ckutil.c b/src/ckutil.c
index bc86c02..9eed9a5 100644
--- a/src/ckutil.c
+++ b/src/ckutil.c
@@ -34,7 +34,7 @@ int util_is_dir(const char *path) {
}
int util_file_exists(const char* path, char *absPath) {
- if (!path || !absPath) {
+ if (!path) {
return 0;
}
struct stat st = {0};
@@ -61,12 +61,12 @@ int util_is_file_link(const char *path) {
if (!path) {
return 0;
}
+ if (!util_file_exists(path, NULL)) {
+ return 0;
+ }
struct stat buf;
lstat(path, &buf);
- if (S_ISLNK(buf.st_mode)) {
- return 0;
- }
- return 1;
+ return S_ISLNK(buf.st_mode);
}
void util_mkdir(const char *name) {