aboutsummaryrefslogtreecommitdiff
path: root/jim-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim-file.c')
-rw-r--r--jim-file.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/jim-file.c b/jim-file.c
index 4a8380b..01e305a 100644
--- a/jim-file.c
+++ b/jim-file.c
@@ -67,14 +67,6 @@
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
-# ifndef MAXPATHLEN
-# ifdef PATH_MAX
-# define MAXPATHLEN PATH_MAX
-# else
-# define MAXPATHLEN JIM_PATH_LEN
-# endif
-# endif
-
#if defined(__MINGW32__) || defined(__MSYS__) || defined(_MSC_VER)
#define ISWINDOWS 1
/* Even if we have symlink it isn't compatible enought to use */
@@ -568,8 +560,8 @@ static int mkdir_all(char *path)
/* Create the parent and try again */
continue;
}
- /* Maybe it already exists as a directory */
- if (errno == EEXIST) {
+ /* Maybe it already exists as a directory. MorphOS can return ENOTDIR instead of EEXIST */
+ if (errno == EEXIST || errno == ENOTDIR) {
jim_stat_t sb;
if (Jim_Stat(path, &sb) == 0 && S_ISDIR(sb.st_mode)) {