Fix fallback to ~/Desktop when xdg-user-dir is not available. Closes: #688833

Really the fix here is to make Utility.Process only throw IOErrors,
which is what I naturally assumed it'd throw.
This commit is contained in:
Joey Hess 2012-09-25 22:48:17 -04:00
parent 84d431a679
commit 926ffaf3f3
2 changed files with 4 additions and 2 deletions

View file

@ -101,14 +101,14 @@ writeReadProcessEnv cmd args environ input = do
, env = environ
}
{- Waits for a ProcessHandle, and throws an exception if the process
{- Waits for a ProcessHandle, and throws an IOError if the process
- did not exit successfully. -}
forceSuccessProcess :: CreateProcess -> ProcessHandle -> IO ()
forceSuccessProcess p pid = do
code <- waitForProcess pid
case code of
ExitSuccess -> return ()
ExitFailure n -> error $ showCmd p ++ " exited " ++ show n
ExitFailure n -> fail $ showCmd p ++ " exited " ++ show n
{- Waits for a ProcessHandle and returns True if it exited successfully. -}
checkSuccessProcess :: ProcessHandle -> IO Bool