Was wondering where those millions of log entries `IsBerkeleyBtree: No such file or directory <walletdir/wallet>` come from. Figured out, whenever hovering over the menu, such an entry is made for each and every wallet in the wallet dir. 
That's not very helpful when frequently used...

apparently #15583 didn't fix that
{
    
    
    boost::system::error_code ec;
    auto size = fs::file_size(path, ec);
    if (ec) LogPrintf("%s: %s %s\n", __func__, ec.message(), path.string());
    if (size < 4096) return false;
    fsbridge::ifstream file(path, std::ios::binary);
    if (!file.is_open()) return false;
    file.seekg(12, std::ios::beg); 
    uint32_t data = 0;
    file.read((char*) &data, sizeof(data)); 
    
    
    
    
    return data == 0x00053162 || data == 0x62310500;
}
std::vector<fs::path> ListWalletDir()