aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fs.c b/src/fs.c
index 1ee7901..e3f4d1f 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -13,6 +13,11 @@ FSTree *fstree(const char *_path) {
FTSENT *node = NULL;
FSTree *fsdata = NULL;
char *path = realpath(_path, NULL);
+ if (path == NULL) {
+ perror(_path);
+ fprintf(SYSERROR);
+ return NULL;
+ }
char *root[2] = { path, NULL };
size_t dirs_size = 2;