Skip to content

fix(c/driver_manager): InternalAdbcUserConfigDir should return parent path#4084

Open
Roshan1299 wants to merge 5 commits intoapache:mainfrom
Roshan1299:fix/4081-user-config-dir-parent-path
Open

fix(c/driver_manager): InternalAdbcUserConfigDir should return parent path#4084
Roshan1299 wants to merge 5 commits intoapache:mainfrom
Roshan1299:fix/4081-user-config-dir-parent-path

Conversation

@Roshan1299
Copy link

InternalAdbcUserConfigDir unnecessarily appended "drivers" to the path even though it is used for both driver manifests and profiles. Each call site now appends the appropriate subdirectory ("drivers" or "profiles") directly.

Changes

  • Remove "drivers" suffix from InternalAdbcUserConfigDir so it returns the base ADBC config directory on all platforms
  • Update driver loading call sites to explicitly append / "drivers"
  • Remove the .parent_path() workaround in profiles, which now appends / "profiles" directly
  • Update the driver manifest test to use the drivers subdirectory
  • Apply the same changes to the go/adbc/drivermgr mirror

Fixes #4081

…onfigDir

Signed-off-by: Roshan1299 <banisettirosh@gmail.com>
…nfigDir call site

Signed-off-by: Roshan1299 <banisettirosh@gmail.com>
…ubdirectory

Signed-off-by: Roshan1299 <banisettirosh@gmail.com>
if (levels & ADBC_LOAD_FLAG_SEARCH_USER) {
// Check the user configuration directory
std::filesystem::path user_config_dir = InternalAdbcUserConfigDir();
std::filesystem::path user_config_dir = InternalAdbcUserConfigDir() / "drivers";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the capitalization has to change based on the system (linux and venvs get "drivers" while Windows and mac get "Drivers")

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, added a platform-specific kDriversSubdir constant ("Drivers" on Windows/macOS, "drivers" on Linux) and updated the test with the same #ifdef.

Not(IsOkStatus(&error)));

auto user_config_dir = InternalAdbcUserConfigDir();
auto user_config_dir = InternalAdbcUserConfigDir() / "drivers";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above, some systems get "Drivers" instead of "drivers"

…rectory

Signed-off-by: Roshan1299 <banisettirosh@gmail.com>
Signed-off-by: Roshan1299 <banisettirosh@gmail.com>
@Roshan1299 Roshan1299 requested a review from zeroshade March 12, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

c/driver_manager: InternalAdbcUserConfigDir should return the parent path

2 participants