summaryrefslogtreecommitdiff
path: root/Backend/File.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-19 01:19:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-19 01:19:56 -0400
commitc7664588f81fe27b3e88d49523ef3c483ac6481a (patch)
treee0cc5dc2f24773a5076f973af38f01ef47f29003 /Backend/File.hs
parent15986f01d1fd565da151dcb08697e21a94fc9037 (diff)
use safesystem
Diffstat (limited to 'Backend/File.hs')
-rw-r--r--Backend/File.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index c97a354d0..8969d7556 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -13,6 +13,7 @@ module Backend.File (backend) where
import Control.Monad.State
import System.IO
import System.Cmd
+import System.Cmd.Utils
import System.Exit
import Control.Exception
@@ -92,11 +93,7 @@ copyFromRemote r key file = do
then getlocal
else getremote
where
- getlocal = do
- res <-rawSystem "cp" ["-a", location, file]
- if (res == ExitSuccess)
- then return ()
- else error "cp failed"
+ getlocal = safeSystem "cp" ["-a", location, file]
getremote = error "get via network not yet implemented!"
location = annexLocation r key