mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
only create autoload subdirectory relative to D_DoomPrefDir() (#619)
This commit is contained in:
parent
bd62ffe056
commit
91d46c9b6f
14
src/d_main.c
14
src/d_main.c
@ -669,15 +669,16 @@ char *D_DoomPrefDir(void)
|
|||||||
static struct {
|
static struct {
|
||||||
const char *dir;
|
const char *dir;
|
||||||
char *(*func)(void);
|
char *(*func)(void);
|
||||||
|
boolean createdir;
|
||||||
} autoload_basedirs[] = {
|
} autoload_basedirs[] = {
|
||||||
#ifdef WOOFDATADIR
|
#ifdef WOOFDATADIR
|
||||||
{WOOFDATADIR, NULL},
|
{WOOFDATADIR, NULL, false},
|
||||||
#endif
|
#endif
|
||||||
{NULL, D_DoomPrefDir},
|
{NULL, D_DoomPrefDir, true},
|
||||||
#if !defined(_WIN32) || defined(_WIN32_WCE)
|
#if !defined(_WIN32) || defined(_WIN32_WCE)
|
||||||
{NULL, D_DoomExeDir},
|
{NULL, D_DoomExeDir, false},
|
||||||
#endif
|
#endif
|
||||||
{NULL, NULL},
|
{NULL, NULL, false},
|
||||||
};
|
};
|
||||||
|
|
||||||
static char **autoload_paths = NULL;
|
static char **autoload_paths = NULL;
|
||||||
@ -725,7 +726,10 @@ static void PrepareAutoloadPaths (void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
M_MakeDirectory(autoload_paths[i]);
|
if (autoload_basedirs[i].createdir)
|
||||||
|
{
|
||||||
|
M_MakeDirectory(autoload_paths[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user