-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix encoding discrepancy in excluded Windows paths #76
Fix encoding discrepancy in excluded Windows paths #76
Conversation
Shouldn't there be a test case for this? |
Oh, wait, there is. Then we should have AppVeyor set up so that this doesn't happen again. |
@XhmikosR Do you want to add the |
I could give it a go later, but my guess is you'd handle this faster than me :P |
@jekyllbot: merge +fix |
@DirtyF Before this gets shipped, we need to ensure that this does not lead to any regressions in the encoding issues patched in the current public release.. |
Summary
When a site is in a directory containing characters with accents and similar entities (e.g.,
testé-çasésûr
),the paths were encoded differently which were seen as a separate directory in the site.
Context
jekyll-watch/lib/jekyll/watcher.rb
Lines 95 to 105 in adc0107
If I were to have a custom destination set to "public", then the
absolute_path
in the code above gets created with encodingEncoding:UTF-8
while theoptions["source"]
encoding was inEncoding:Windows-1252
.This resulted in a "relative_path" (via Pathname) starting with
../
which caused that path to not be included as an ignored_pathor when stringified:
Steps to reproduce issue (Windows only)
jekyll new testé-çasésûr
destination
configuration (regular string)bundle exec jekyll b --watch
orbundle exec jekyll s
/cc @jekyll/windows
Thanks
To @DirtyF for providing a test repository that led to the discovery of this bug