Skip to content

Commit 454efb4

Browse files
marcowsspearce
authored andcommitted
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: Markus Heidelberg <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent c949833 commit 454efb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-gui.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,7 @@ proc do_explore {} {
19471947
# freedesktop.org-conforming system is our best shot
19481948
set explorer "xdg-open"
19491949
}
1950-
eval exec $explorer [file dirname [gitdir]] &
1950+
eval exec $explorer [list [file nativename [file dirname [gitdir]]]] &
19511951
}
19521952
19531953
set is_quitting 0

0 commit comments

Comments
 (0)