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

Fixed bug on windows where relative image path has wrong slashes #12342

Merged
merged 1 commit into from
May 29, 2020
Merged

Fixed bug on windows where relative image path has wrong slashes #12342

merged 1 commit into from
May 29, 2020

Conversation

blakejgriffin
Copy link
Contributor

On Windows, the source_dir is not posix and thus the call to os.path.relpath returns something like
'_build\html\_static'. This causes the image to not load as sphinx expects a posix path. Using pathlib.Path for all of the manipulation and calling as_posix() at the end ensures the value of outfile is always a posix string.

@Carreau
Copy link
Member

Carreau commented May 27, 2020

Thanks ! Your commit does not seem to be associated with your GitHub email, I just want to make sure you are aware in case you want to fix it before I merge.

@Carreau Carreau added this to the 7.15 milestone May 27, 2020
@blakejgriffin
Copy link
Contributor Author

No Problem! Thanks for the catch, I changed the email on the commit.

@Carreau Carreau merged commit a2f85e9 into ipython:master May 29, 2020
@Carreau
Copy link
Member

Carreau commented May 29, 2020

Thanks !

meeseeksmachine pushed a commit to meeseeksmachine/ipython that referenced this pull request May 29, 2020
Carreau added a commit that referenced this pull request May 29, 2020
…342-on-7.x

Backport PR #12342 on branch 7.x (Fixed bug on windows where relative image path has wrong slashes)
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.

None yet

2 participants