[Fix] Silly bug in Lephisto filesystem.
This commit is contained in:
parent
2cfe29f384
commit
3f0faf7983
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user