From 3f0faf7983cb4248dc9eb5128d7ff179815d0b06 Mon Sep 17 00:00:00 2001 From: Allanis <allanis@saracraft.net> Date: Tue, 14 May 2013 22:34:05 +0100 Subject: [PATCH] [Fix] Silly bug in Lephisto filesystem. --- src/lfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lfile.c b/src/lfile.c index 61e1733..f688d03 100644 --- a/src/lfile.c +++ b/src/lfile.c @@ -34,7 +34,10 @@ int lfile_dirMakeExist(char* path) { #ifdef LINUX struct stat buf; - snprintf(file, PATH_MAX, "%s%s", lfile_basePath(), path); + if(strcmp(path, ".")==0) + strncpy(file, lfile_basePath(), PATH_MAX); + else + snprintf(file, PATH_MAX, "%s%s", lfile_basePath(), path); stat(file, &buf); if(!S_ISDIR(buf.st_mode)) if(mkdir(file, S_IRWXU | S_IRWXG | S_IRWXO) < 0) {