diff --git a/cpp/src/arrow/adapters/orc/adapter.cc b/cpp/src/arrow/adapters/orc/adapter.cc index 73430af2c2837..bdd594850ddca 100644 --- a/cpp/src/arrow/adapters/orc/adapter.cc +++ b/cpp/src/arrow/adapters/orc/adapter.cc @@ -194,11 +194,11 @@ Status CheckTimeZoneDatabaseAvailability() { auto conda_prefix = std::getenv("CONDA_PREFIX"); auto tz_dir_raw = std::getenv("TZDIR"); std::string tz_dir = conda_prefix != nullptr - ? std::string(conda_prefix) + "/share/zoneinfo" - : std::string(tz_dir_raw != nullptr ? tz_dir_raw : ""); + ? std::string(conda_prefix) + "/share/zoneinfo" + : std::string(tz_dir_raw != nullptr ? tz_dir_raw : ""); bool is_tzdb_available = (!tz_dir.empty()) - ? std::filesystem::exists(tz_dir) - : std::filesystem::exists("/usr/share/zoneinfo"); + ? std::filesystem::exists(tz_dir) + : std::filesystem::exists("/usr/share/zoneinfo"); if (!is_tzdb_available) { return Status::Invalid( "IANA time zone database is unavailable but required by ORC."