Repository: bitcoin/bitcoin
File: src/common/init.cpp (C++)

Code before:
            {args.GetBlocksDirPath(), "blocks directory"}
        }};

        std::vector<std::string> exfat_paths;
        std::vector<std::string> error_paths;

        for (const auto& check : paths) {
            FSType fs_type = GetFilesystemType(check.path);
            switch(fs_type) {
                case FSType::EXFAT:
                    exfat_paths.push_back(strprintf("%s (\"%s\")",
                        check.description,
                        fs::PathToString(check.path)));
                    break;
                case FSType::ERROR:
                    error_paths.push_back(strprintf("%s (\"%s\")",
                        check.description,
                        fs::PathToString(check.path)));
                    break;
                default:
                    break;
            }
        }

        if (!exfat_paths.empty()) {
            InitWarning(strprintf(_("The following paths are on exFAT which is known to have intermittent corruption problems on MacOS: %s. "
                "See https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#filesystem-recommendations for more information."),
                util::Join(exfat_paths, ", ")));
        }

        if (!error_paths.empty()) {
            LogInfo("Failed to detect filesystem type for: %s\n", util::Join(error_paths, ", "));
        }
#endif
        // Show an error or warn/log if there is a bitcoin.conf file in the
        // datadir that is being ignored.
        const fs::path base_config_path = base_path / BITCOIN_CONF_FILENAME;
        if (fs::exists(base_config_path)) {
            if (orig_config_path.empty()) {
                LogInfo(
                    "Data directory %s contains a %s file which is explicitly ignored using -noconf.",
                    fs::quoted(fs::PathToString(base_path)),
                    fs::quoted(BITCOIN_CONF_FILENAME));
            } else if (!fs::equivalent(orig_config_path, base_config_path)) {
                const std::string cli_config_path = args.GetArg("-conf", "");
                const std::string config_source = cli_config_path.empty()
                    ? strprintf("data directory %s", fs::quoted(fs::PathToString(orig_datadir_path)))
                    : strprintf("command line argument %s", fs::quoted("-conf=" + cli_config_path));
                std::string error = strprintf(
                    "Data directory %1$s contains a %2$s file which is ignored, because a different configuration file "
                    "%3$s from %4$s is being used instead. Possible ways to address this would be to:\n"

Review comment (suggestion):
small nit:
```suggestion
            InitWarning(strprintf(_("The following paths are on exFAT which is known to have intermittent corruption problems on macOS: %s. "
```

Code after:
            } else if (!fs::equivalent(orig_config_path, base_config_path)) {
                const std::string cli_config_path = args.GetArg("-conf", "");
                const std::string config_source = cli_config_path.empty()
                    ? strprintf("data directory %s", fs::quoted(fs::PathToString(orig_datadir_path)))
                    : strprintf("command line argument %s", fs::quoted("-conf=" + cli_config_path));
                std::string error = strprintf(
                    "Data directory %1$s contains a %2$s file which is ignored, because a different configuration file "
                    "%3$s from %4$s is being used instead. Possible ways to address this would be to:\n"
                    "- Delete or rename the %2$s file in data directory %1$s.\n"
                    "- Change datadir= or conf= options to specify one configuration file, not two, and use "
                    "includeconf= to include any other configuration files.",
                    fs::quoted(fs::PathToString(base_path)),
                    fs::quoted(BITCOIN_CONF_FILENAME),
                    fs::quoted(fs::PathToString(orig_config_path)),
                    config_source);
                if (args.GetBoolArg("-allowignoredconf", false)) {
                    LogWarning("%s", error);
                } else {
                    error += "\n- Set allowignoredconf=1 option to treat this condition as a warning, not an error.";
                    return ConfigError{ConfigStatus::FAILED, Untranslated(error)};
                }
            }
        }

        // Create settings.json if -nosettings was not specified.
        if (args.GetSettingsPath()) {
            std::vector<std::string> details;
            if (!args.ReadSettingsFile(&details)) {
                const bilingual_str& message = _("Settings file could not be read");
                if (!settings_abort_fn) {
                    return ConfigError{ConfigStatus::FAILED, message, details};
                } else if (settings_abort_fn(message, details)) {
                    return ConfigError{ConfigStatus::ABORTED, message, details};
                } else {
                    details.clear(); // User chose to ignore the error and proceed.
                }
            }
            if (!args.WriteSettingsFile(&details)) {
                const bilingual_str& message = _("Settings file could not be written");
                return ConfigError{ConfigStatus::FAILED_WRITE, message, details};
            }
        }
    } catch (const std::exception& e) {
        return ConfigError{ConfigStatus::FAILED, Untranslated(e.what())};
    }
    return {};
}
} // namespace common