#include "view/display-scores.h"
#include "wizard/spoiler-util.h"
#include "wizard/wizard-spoiler.h"
-#include <filesystem>
#include <string>
/*
* all the others use this file for their "main()" function.
*/
-#ifndef WINDOWS
+#if !defined(WINDOWS) && !defined(MACH_O_COCOA)
/*
* A hook for "quit()".
*
}
}
-/*
- * Set the stack size and overlay buffer (see main-286.c")
- */
-#ifdef PRIVATE_USER_PATH
-
-/*
- * Create an ".angband/" directory in the users home directory.
- *
- * ToDo: Add error handling.
- * ToDo: Only create the directories when actually writing files.
- */
-static void create_user_dir(void)
-{
- const auto &dirpath = path_parse(PRIVATE_USER_PATH);
- const auto &dir_str = dirpath.string();
- mkdir(dir_str.data(), 0700);
-
- const auto &subdirpath = path_build(dirpath, VARIANT_NAME);
- const auto &subdir_str = subdirpath.string();
- mkdir(subdir_str.data(), 0700);
-}
-
-#endif /* PRIVATE_USER_PATH */
-
static void init_stuff()
{
char libpath[1024]{};
strcat(libpath, PATH_SEP);
}
- init_file_paths(libpath);
+ init_file_paths(libpath, libpath);
}
/*
#ifdef SET_UID
user_name(p_ptr->name, ids.get_user_id());
#ifdef PRIVATE_USER_PATH
- create_user_dir();
+ /* Create a directory for the user's files; handled by init.c. */
+ create_needed_dirs();
#endif /* PRIVATE_USER_PATH */
#endif /* SET_UID */