Skip to content

Windows#96

Merged
osteele merged 1 commit into
mainfrom
windows
Nov 22, 2025
Merged

Windows#96
osteele merged 1 commit into
mainfrom
windows

Conversation

@osteele
Copy link
Copy Markdown
Owner

@osteele osteele commented Nov 15, 2025

No description provided.

@osteele osteele force-pushed the windows branch 6 times, most recently from 9165c91 to da13d1a Compare November 16, 2025 00:39
This commit fixes the last two Windows-specific test failures:

1. Fixed TestParseAndRun (link tag path lookup failure)
   - site/site.go: Normalize input path separators in FilePathPage()
   - The {% link %} tag passes paths with forward slashes (e.g., _c1/c1p1.md)
   - On Windows, filepath.Rel() returns backslashes, causing comparison to fail
   - Solution: Use filepath.FromSlash() to normalize input before comparison
   - This matches Jekyll behavior: templates use / but files use OS paths

2. Fixed TestRemoveEmptyDirectories (Windows ERROR_DIR_NOT_EMPTY)
   - utils/ioutil.go: Check for Windows syscall.ERROR_DIR_NOT_EMPTY
   - Created platform-specific build files (ioutil_windows.go, ioutil_unix.go)
   - Unix systems use ENOTEMPTY, Windows uses ERROR_DIR_NOT_EMPTY
   - The IsNotEmpty() function now checks for both error codes
   - Platform-specific files needed because ERROR_DIR_NOT_EMPTY is Windows-only

All tests now pass on macOS, Linux, and Windows.

Related to #31
@osteele osteele merged commit 565232a into main Nov 22, 2025
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.

1 participant