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

UNC パス対応 #209

Closed
southly opened this issue Apr 10, 2012 · 1 comment
Closed

UNC パス対応 #209

southly opened this issue Apr 10, 2012 · 1 comment
Assignees
Milestone

Comments

@southly
Copy link
Contributor

southly commented Apr 10, 2012

カレントディレクトリが UNC パスの場合、cmd.exe が起動できないので、
適当な場所にカレントディレクトリを移してから起動するように修正する必要があります。

@x022235
Copy link
Member

x022235 commented Apr 11, 2012

ありがとうございます。以下のようにしようと思います。

  • ed:filter-region でも同じ問題があるので、 ed::shell-command-line で対応する
    • ed::shell-command-linedir が UNC パスだったら、
      起動ディレクトリとして (get-windows-directory) を返す
    • UNC パスで cmd.exe を起動した場合、余計なメッセージを出しつつ
      C:\Windows をカレントディレクトリとして起動するので互換性は保たれる
    • 余計なメッセージが出ているから ed::diff-scan がエラーになっていた
  • call-process, make-process では特に何もしない
    • UNC パスをサポートしているかどうかはコマンドによるので、
      適切な :exec-directory を指定するのは呼び出し側の責任

@ghost ghost assigned x022235 Apr 11, 2012
x022235 added a commit that referenced this issue Apr 11, 2012
ed::shell-command-line でコマンド実行時のディレクトリが
UNC パスの場合は get-windows-directory で取得したディレクトリ
で実行するようにした。

execute-shell-command, filter-region では指定したコマンドを cmd.exe
経由で実行するようにしている (`ed::shell-command-line`)。

しかし UNC パス上で cmd.exe を起動した場合、以下のエラーメッセージが
標準エラー出力に出力され diff などが動作しなかった。

  上記の現在のディレクトリで CMD.EXE を開始しました。
  UNC パスはサポートされません。Windows ディレクトリを既定で使用します。
@x022235 x022235 closed this as completed Apr 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants