提交 454efb47 编写于 作者: M Markus Heidelberg 提交者: Shawn O. Pearce

git-gui (Win): make "Explore Working Copy" more robust

Starting the Explorer from the git-gui menu "Explore Working Copy"
didn't work, when git-gui was started via Windows Explorer shell
extension (Git GUI Here) from a directory within the project.
The Explorer raised an error message like this:

    Path "C:/somedir/worktree" is not available or not a directory

It worked when started from the project directory itself, because then
the path argument for the Explorer was just '.' (current directory)
without any problematic forward slashes.

To make it work, convert the path given as argument to explorer.exe to
its native format with backslashes.
Signed-off-by: NMarkus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 c9498339
......@@ -1947,7 +1947,7 @@ proc do_explore {} {
# freedesktop.org-conforming system is our best shot
set explorer "xdg-open"
}
eval exec $explorer [file dirname [gitdir]] &
eval exec $explorer [list [file nativename [file dirname [gitdir]]]] &
}
set is_quitting 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册