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

Can't open folder with "," in path. (","がpathに含まれるフォルダを開けない) #9

Open
tksugimoto opened this issue Sep 25, 2022 · 0 comments

Comments

@tksugimoto
Copy link
Owner

tksugimoto commented Sep 25, 2022

https://chrome.google.com/webstore/detail/open-local-folder-by-expl/ehidkllolkmedbkjbdkcgabdadcfppfg/support

,を含むフォルダについては、通知では正しいパス名を表示しているが、実際に開かれるフォルダは「ドキュメント」フォルダになります。

ファイルパスによる動作の違い

  • , なし: 開ける
    • aaa/
    • aaa/test.txt
    • bbb.txt
  • , あり・ (スペース) あり: 開ける
    • a,a a/
    • a,a a/test.txt
    • b,b b.txt
  • , あり・ (スペース) なし: 開けない
    • a,a/
    • a,a/test.txt
    • b,b.txt

参考

対策

  • フォルダ時
    • exec(`explorer "${path}"`)
      • ⚠️ サニタイズに注意
  • ファイル選択時
    • exec(`explorer /select,"${path}"`) とすればOK
      • ⚠️ サニタイズに注意
    • exec(`explorer "/select" "${path}"`) は上手く動かない
    • execFile('explorer', [`/select,"${path}"`] もNG

いずれにせよ、host app の更新が必要(なくても , 以外なら動く)

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

No branches or pull requests

1 participant