outputに./data/output以外を指定するとエラーになる問題を修正#7
Open
u-one wants to merge 1 commit intoProject-PLATEAU:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
以下のように
--outputのパラメタに./data/output/以外のpathを指定すると最後のファイル保存処理で出力pathが見つからない旨のエラーになりました。
原因は実装の一部が、outputの引数に関係なく./data/output/ 以下を出力先を想定している実装になっているようです。
現象
エラー発生時のコマンドとエラー内容:
原因
具体的には、以下の処理は
./data/output/world_data/regionが出力先として固定pathになっている。一方、最終的に生成ファイルの出力先だけ
{output}/world_data/regionとなるようになっている。その結果、outputパラメタが
./data/output/を指定している場合は問題ないようですが、これ以外を指定するとpathがあらかじめ存在する場合以外はファイルsave時にpathが存在せずエラーとなるようです。
修正内容
上記の一部pathが固定されている箇所をすべて、
{output}/world_data/regionとなり一貫したpathを参照するよう修正しました。
動作確認
ディレクトリが存在しない状態で以下2パターンを実行
→
./output/world_data/regionにファイルが生成される→
./data/output/world_data/regionにファイルが生成されるディレクトリと生成ファイルが存在する状態で以下を実行
→
./data/output/world_data/regionのファイルが一度削除されて再び生成される