Windows: Fix opening file browser from webapp when repo is in a directory with spaces.
This commit is contained in:
parent
5977e161f3
commit
8f98d28da4
2 changed files with 8 additions and 4 deletions
|
@ -118,20 +118,22 @@ openFileBrowser = do
|
|||
path <- liftAnnex $ fromRepo Git.repoPath
|
||||
#ifdef darwin_HOST_OS
|
||||
let cmd = "open"
|
||||
let params = [Param path]
|
||||
let p = proc cmd [path]
|
||||
#else
|
||||
#ifdef mingw32_HOST_OS
|
||||
{- Changing to the directory and then opening . works around
|
||||
- spaces in directory name, etc. -}
|
||||
let cmd = "cmd"
|
||||
let params = [Param $ "/c start " ++ path]
|
||||
let p = (proc cmd ["/c start ."]) { cwd = Just path }
|
||||
#else
|
||||
let cmd = "xdg-open"
|
||||
let params = [Param path]
|
||||
let p = proc cmd [path]
|
||||
#endif
|
||||
#endif
|
||||
ifM (liftIO $ inPath cmd)
|
||||
( do
|
||||
let run = void $ liftIO $ forkIO $ void $
|
||||
boolSystem cmd params
|
||||
createProcess p
|
||||
run
|
||||
#ifdef mingw32_HOST_OS
|
||||
{- On windows, if the file browser is not
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -4,6 +4,8 @@ git-annex (5.20140614) UNRELEASED; urgency=medium
|
|||
* Windows: Got rid of that pesky DOS box when starting the webapp.
|
||||
* Windows: Added Startup menu item so assistant starts automatically
|
||||
on login.
|
||||
* Windows: Fix opening file browser from webapp when repo is in a
|
||||
directory with spaces.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 16 Jun 2014 11:28:42 -0400
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue