summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utility/Path.hs7
-rw-r--r--debian/changelog1
2 files changed, 7 insertions, 1 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs
index 8c78409b8..216b2401d 100644
--- a/Utility/Path.hs
+++ b/Utility/Path.hs
@@ -181,7 +181,12 @@ searchPath command
| otherwise = getSearchPath >>= getM indir
where
indir d = check $ d </> command
- check f = ifM (doesFileExist f) ( return (Just f), return Nothing )
+ check f = firstM doesFileExist
+#ifdef __WINDOWS__
+ [f, f ++ ".exe"]
+#else
+ [f]
+#endif
{- Checks if a filename is a unix dotfile. All files inside dotdirs
- count as dotfiles. -}
diff --git a/debian/changelog b/debian/changelog
index 1f8a46154..1fc79b0b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ git-annex (4.20130628) UNRELEASED; urgency=low
branch works.
* addurl --pathdepth: Fix failure when the pathdepth specified is deeper
than the urls's path.
+ * Windows: Look for .exe extension when searching for a command in path.
-- Joey Hess <joeyh@debian.org> Tue, 02 Jul 2013 15:40:55 -0400