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

update_docs complains under windows #234

Closed
mstovenour opened this issue Jul 14, 2013 · 4 comments
Closed

update_docs complains under windows #234

mstovenour opened this issue Jul 14, 2013 · 4 comments
Labels

Comments

@mstovenour
Copy link
Collaborator

The pull request for issue #199 has a subtle bug under windows. It will always complain about setting the html_alias2_docs directory to a place outside the mh distribution. Apparently the stat() function always returns inode==0 on windows. Maybe there is a simpler, all be it less reliable, way to make this check.

@krkeegan
Copy link
Collaborator

Hmm, well we could take the simple way out and just compare the paths, if they match we give the error?

I can't think of a way to get the benefits of matching an inode number without using an inode number.

@krkeegan
Copy link
Collaborator

Yeah this old perl monks topic seems to confirm that the functionality we seek is not available in the base install of perl for windows. One entry suggests delving into the Win32::API class, but I am not very excited about that idea.

http://www.perlmonks.org/?node_id=859612

krkeegan added a commit to krkeegan/misterhouse that referenced this issue Jul 23, 2013
If inode==0 then we are probably on windows, so use abs_path to compare the two paths and see if they are the same.

I don't have windows so hopefully this works.

Fixes hollie#234
@krkeegan
Copy link
Collaborator

Michael, can you test this and see if this fixes the glitch?

@mstovenour
Copy link
Collaborator Author

Thanks! This works in both Linux and Windows. In windows I tested three cases. 1) html_alias2_docs not specified (received warning), 2) html_alias2_docs specified but ultimately pointing to the mh installation path (received warning), and 3) html_alias2_docs pointing outside the mh installation path (did not receive warning).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants