-/* Sets and creates the directory to which files are to be extracted when
- * extracting files from the WIM. */
-static int make_output_dir(const char *dir)
-{
- char *p;
- DEBUG("Setting output directory to `%s'", dir);
-
- if (mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) != 0) {
- if (errno == EEXIST) {
- DEBUG("`%s' already exists", dir);
- return 0;
- }
- ERROR_WITH_ERRNO("Cannot create directory `%s'", dir);
- return WIMLIB_ERR_MKDIR;
- } else {
- DEBUG("Created directory `%s'", dir);
- }
- return 0;
-}
-