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

basedirを相対パスではなく絶対パスに #1088

Merged
merged 2 commits into from
Jul 29, 2018
Merged

Conversation

kmuto
Copy link
Owner

@kmuto kmuto commented Jul 29, 2018

#1086 の修正です。

だいぶ前から間違えていて、pdfmaker内の@basedirが相対パス(.)のまま格納されていたため、参照時にchdirしていると本来意図していた元コンテンツフォルダではなく一時生成フォルダのほうを見てしまっていました。

フックのほうは別変数名(@basehookdir)で絶対パス展開したものを使っていたので気付くのが遅れました…。フック側と分ける意味はないので、@basedirを絶対パスにし(これで#1086は是正)、フックもこの変数を使うようにします。

@takahashim
Copy link
Collaborator

この変更ですが、 #673 とかは大丈夫なんでしょうか?
(ちなみに索引は使ってないので特に意見はないのでした…)

@kmuto
Copy link
Owner Author

kmuto commented Jul 29, 2018

む… そういえばまた別の罠があったか…。検証します。basehookdirではないにせよ、2つ変数用意したほうがいいのかな。

@kmuto kmuto changed the title @basedirを相対パスではなく絶対パスに @basehookdirの名前を変更し、索引の参照パスもそちらを使う Jul 29, 2018
@kmuto kmuto changed the title @basehookdirの名前を変更し、索引の参照パスもそちらを使う basedirを相対パスではなく絶対パスに Jul 29, 2018
@kmuto
Copy link
Owner Author

kmuto commented Jul 29, 2018

ReVIEW::Book.loadに渡ったものがそのままimagesなどで使われる仕様になっているので、そこだけ昔の@basedirの値相当の内容を入れるようにしました。

いちおうこれで対処はできたはずです(ただ別のマイナーな問題も発見したので、それは別issueで)。

@kmuto
Copy link
Owner Author

kmuto commented Jul 29, 2018

ビルドエラーはビルド環境側の問題のようなので、これでマージしておきます。

@kmuto kmuto merged commit 16064bf into master Jul 29, 2018
@kmuto kmuto deleted the fix-basedirpath branch July 29, 2018 12:28
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.

2 participants