diff options
-rw-r--r-- | uisimulator/tree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/uisimulator/tree.c b/uisimulator/tree.c index 5cbc358842..98e5c027aa 100644 --- a/uisimulator/tree.c +++ b/uisimulator/tree.c @@ -53,8 +53,11 @@ struct entry { bool is_dir(char* path) { DIR* dir = opendir(path); - closedir(dir); - return (dir!=0); + if(dir) { + closedir(dir); + return TRUE; + } + return FALSE; } int static |