Repository navigation
Handle Windows paths - #379
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #379 +/- ##
==========================================
- Coverage 93.04% 93.00% -0.05%
==========================================
Files 15 15
Lines 3135 3144 +9
==========================================
+ Hits 2917 2924 +7
- Misses 218 220 +2
🚀 New features to boost your workflow:
|
fingolfin
marked this pull request as ready for review
November 10, 2026 13:45
AUTODOC_CurrentDirectory ran the pwd program, which under MSYS2 prints a path such as /c/gap2 that native Windows programs cannot use. Several places also took a path to be absolute only if it starts with a slash, so on Windows they prefixed an absolute C:/... path with that directory, yielding /c/gap2/C:/gap2/... . Use GAP_getcwd, and recognize drive paths as absolute via the new AUTODOC_IsAbsolutePath. Assisted-by: Generative AI
fingolfin
force-pushed
the
mh/win-paths
branch
from
November 10, 2026 13:47
e406640 to
f6488a4
Compare
AUTODOC_CreateDirIfMissing treated only paths starting with a slash as absolute, so a `..` could remove the drive of a path such as C:/../doc and create the directory relative to the working directory instead. Split off the root prefix of the path first, shared with AUTODOC_IsAbsolutePath via the new AUTODOC_PathRoot. Check ARCH_IS_WINDOWS last there, as on Cygwin it tests for files. AUTODOC_CurrentDirectory now raises an error when the working directory cannot be determined, instead of returning fail. Assisted-by: Generative AI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AUTODOC_CurrentDirectory ran the pwd program, which under MSYS2 prints a path such as /c/gap2 that native Windows programs cannot use. Several places also took a path to be absolute only if it starts with a slash, so on Windows they prefixed an absolute C:/... path with that directory, yielding /c/gap2/C:/gap2/... . Use GAP_getcwd, and recognize drive paths as absolute via the new AUTODOC_IsAbsolutePath.
Assisted-by: Claude Code (Opus 5)
GAP_getcwdis only available in recent GAP; andAUTODOC_IsAbsolutePathis probably something we should have built into GAP. So I am not sure we'll want to keep this as it is. Hrm.