threads / patch / 18676

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

Subject: [PATCH] git-gui (Win): make "Explore Working Copy" more robust

## tl;dr

One message between Mar 31, 2009 and Mar 31, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Markus Heidelberg· Mar 31, 2009, 23:55 UTC · lore

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 <markus.heidelberg@web.de>
---

Now this is the real location of the problem in contrast of the workaround attempt from 2 days before. I've also tested this change with xdg-open.

 git-gui.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-gui.sh +1 −1
diff --git a/git-gui.sh b/git-gui.sh
index b3aa732..712fe27 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1924,7 +1924,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
-- 
1.6.2.1.428.g41b20c

← back to recent threads