-
Notifications
You must be signed in to change notification settings - Fork 346
feat: 不適切なフォルダにファイルを保存できないようにする #1844
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
Conversation
Hiroshiba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
書き出し先を固定するのチェックをオンにした状態で書き出し先のフォルダが未指定だとVOICEVOXのインストールディレクトリにファイルを保存してしまうという良くない挙動をすることに気づきました。
・・・・・・インストールディレクトリの保存してしまうの、これが原因なのでは・・・!?
かなり問題だと感じました。
お手数おかけして申し訳ないのですがissueの作成お願いすることはできますか 🙇 🙇 🙇
たぶんディレクトリ名が指定されてない時に空文字列が代入されてて、それが相対パスになっちゃってインストールディレクトリに保存される気がしました。
空のディレクトリを指定できてしまうのがよくなさそうですが、とりあえず応急処置として・・・・・$HOME/Documents辺りのパスが代入されてるといいかも??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retryShowSaveDialogWhileSafeDirラッパー、良いですね!!
SAVE系のダイアログではretryShowSaveDialogWhileSafeDirを呼ばないといけないっての、忘れそうですね・・・・・・・・。
とはいえ防ぐ方法は思いつかなかったのですが・・・。
もしよかったらいろんな機能追加の際に気を配っていただけると心強いです 🙇
Co-authored-by: Hiroshiba <[email protected]>
Co-authored-by: Hiroshiba <[email protected]>
Hiroshiba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!!
ありがとうございました!!
ちょっとあとは細かい仕上げなので、こっちでやっちゃおうと思います!
(もし興味あれば取り組んでいただいても!!)
書き出し先固定が空欄になってしまう問題もかなり危ないように感じています。
もしいけそうだったら倒していただけると・・・!!!
| /** | ||
| * 警告ダイアログを表示し、ユーザーが再試行を選択したかどうかを返す | ||
| */ | ||
| const showWarningDialog = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 true/falseのリターンがどっちがどっちかわかりやすい関数名にする。showRetryOrNotDialog・・・?
意図を追加 Co-authored-by: Hiroshiba <[email protected]>
|
(コメント取り組んでくださったのめちゃくちゃ助かります、ありがとうございます 🙇) |
|
コンフリクト解消まで終わりました。 |
Hiroshiba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!!
ありがとうございました!!!
まだまだ微妙な UX なところはいっぱいあると思うのでぜひ改良していただけるととても助かります!!!
SHOW_OPEN_DIRECTORY_DIALOGとSHOW_SAVE_DIRECTORY_DIALOGの差がわかりづらそうだったのでコメントを書き足させていただきます!
内容
VOICEVOXの更新時にVOICEVOXのインストールディレクトリに保存したファイルが消失したというポストが複数件寄せられています。
これをある程度回避するためにファイルを不適切な場所に保存しようとした場合それを拒否して再度保存場所を指定するようにします。
保存に不適切なディレクトリはとりあえずVOICEVOXのインストールディレクトリと設定ファイルのディレクトリにしました。
スクリーンショット・動画など
その他
macでの動作確認をしていません。
直接インストールディレクトリにファイルを置いた場合は無力です。
書き出し先を固定するのチェックをオンにした状態で書き出し先のフォルダが未指定だとVOICEVOXのインストールディレクトリにファイルを保存してしまうという良くない挙動をすることに気づきました。