Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Windows paths to WSL paths when running under WSL #549

Merged
merged 3 commits into from
Aug 16, 2024

Conversation

tfriedel
Copy link
Contributor

@tfriedel tfriedel commented Aug 11, 2024

This pull request includes a commit that adds functionality to convert Windows paths to Unix paths when running under Windows Subsystem for Linux (WSL). This is achieved by replacing backslashes with forward slashes and converting the drive letter to the corresponding /mnt/<drive-letter> format. This enhancement ensures that file paths are correctly handled when running the software under WSL.

fixes #548

Copy link
Owner

@akiyosi akiyosi left a comment

Choose a reason for hiding this comment

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

Please address the following two points:

  • Run go fmt to format the code according to Go's style guidelines.
  • When checking for a colon after the drive letter in convertWindowsToUnixPath(), consider adding an early return if the path is less than two characters long to avoid potential issues.

@akiyosi akiyosi merged commit 8e5d65b into akiyosi:master Aug 16, 2024
5 checks passed
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.

drag & drop of files in WSL
2 participants