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

Code before:
        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. "
            "Move these directories to a non-exFAT formatted drive to avoid corruption."),
            util::Join(exfat_paths, ", ")));
    }

    if (!error_paths.empty()) {
        LogInfo("Failed to detect filesystem type for: %s\n", util::Join(error_paths, ", "));
    }
#endif

#if HAVE_SYSTEM
    const std::string block_notify = args.GetArg("-blocknotify", "");
    if (!block_notify.empty()) {
        uiInterface.NotifyBlockTip_connect([block_notify](SynchronizationState sync_state, const CBlockIndex& block, double /* verification_progress */) {
            if (sync_state != SynchronizationState::POST_INIT) return;
            std::string command = block_notify;
            ReplaceAll(command, "%s", block.GetBlockHash().GetHex());
            std::thread t(runCommand, command);
            t.detach(); // thread runs free
        });
    }
#endif

    std::vector<fs::path> vImportFiles;
    for (const std::string& strFile : args.GetArgs("-loadblock")) {
        vImportFiles.push_back(fs::PathFromString(strFile));
    }

    node.background_init_thread = std::thread(&util::TraceThread, "initload", [=, &chainman, &args, &node] {
        ScheduleBatchPriority();
        // Import blocks and ActivateBestChain()
        ImportBlocks(chainman, vImportFiles);
        if (args.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
            LogPrintf("Stopping after block import\n");

Review comment (suggestion):
nitty-nit: right now the ouput seems to be plural, i.e directories when it's one so this might be better?
```suggestion
if (!exfat_paths.empty()) {Add commentMore actions
        for (const auto& path : exfat_paths) {
            InitWarning(strprintf(_("The specified %s is on exFAT which is known to have intermittent corruption problems on macOS. "
                                    "Restart with non-exFAT formatted drive to avoid corruption."),
                                    path));
        }
    }
```

Code after:
        }
    }

#ifdef __APPLE__
    auto check_and_warn_fs{[&](const fs::path& path, std::string_view desc) {
        const auto path_desc{strprintf("%s (\"%s\")", desc, fs::PathToString(path))};
        switch (GetFilesystemType(path)) {
        case FSType::EXFAT:
            InitWarning(strprintf(_("The %s path uses exFAT, which is known to have intermittent corruption problems on macOS. "
                "Move this directory to a different filesystem to avoid data loss."), path_desc));
            break;
        case FSType::ERROR:
            LogInfo("Failed to detect filesystem type for %s", path_desc);
            break;
        case FSType::OTHER:
            break;
        }
    }};

    check_and_warn_fs(args.GetDataDirNet(), "data directory");
    check_and_warn_fs(args.GetBlocksDirPath(), "blocks directory");
#endif

#if HAVE_SYSTEM
    const std::string block_notify = args.GetArg("-blocknotify", "");
    if (!block_notify.empty()) {
        uiInterface.NotifyBlockTip_connect([block_notify](SynchronizationState sync_state, const CBlockIndex& block, double /* verification_progress */) {
            if (sync_state != SynchronizationState::POST_INIT) return;
            std::string command = block_notify;
            ReplaceAll(command, "%s", block.GetBlockHash().GetHex());
            std::thread t(runCommand, command);
            t.detach(); // thread runs free
        });
    }
#endif

    std::vector<fs::path> vImportFiles;
    for (const std::string& strFile : args.GetArgs("-loadblock")) {
        vImportFiles.push_back(fs::PathFromString(strFile));
    }

    node.background_init_thread = std::thread(&util::TraceThread, "initload", [=, &chainman, &args, &node] {
        ScheduleBatchPriority();
        // Import blocks and ActivateBestChain()
        ImportBlocks(chainman, vImportFiles);
        if (args.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
            LogInfo("Stopping after block import");
            if (!(Assert(node.shutdown_request))()) {
                LogError("Failed to send shutdown signal after finishing block import\n");
            }
            return;