Skip to content

Cross-Platform Path Separator Inconsistencies via path Package #476

Closed

Description

@aniket866

Describe the bug

Description

In pkg/config/localconfig.go, configuration directory pathing and creation utilities use the path package instead of path/filepath. The Go standard library path package is strictly designed for forward-slash URL paths and does not handle Windows backslashes (\).

Impact

On Windows systems, paths are constructed in a mixed format (e.g. C:\Users\Name/.config/microcks/config), which causes file system APIs and permissions logic to fail or look in wrong locations.

Code Reference

  • pkg/config/localconfig.go

Diagram

graph TD
    A["getHomeDir() on Windows -> 'C:\\Users\\Name'"] --> B["path.Join(homeDir, '.config', 'microcks')"]
    B --> C["Result: 'C:\\Users\\Name/.config/microcks'"]
    C --> D["os.MkdirAll() creates folders with mixed slashes, breaking standard Windows paths"]
Loading

Steps to Reproduce

  1. Execute any command that reads or writes config on Windows (e.g., microcks login).
  2. The config directory is created/resolved in a non-native path format with mixed slashes.

Activity

  1. github-actions commented on Jul 24, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity 😴

    It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

    There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

    Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

    Thank you for your patience ❤️

  2. Caesarsage commented on Aug 16, 2026

    @Caesarsage
    Contributor

    Thank you @aniket866

    This has been fixed by #442 — pkg/config/localconfig.go now uses path/filepath (filepath.Join) for all config path construction, so Windows paths come out native.

    I believe this can be closed.

  3. github-actions commented on Sep 16, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity 😴

    It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

    There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

    Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

    Thank you for your patience ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleState due to inactivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions