aboutsummaryrefslogtreecommitdiff
path: root/Utility/Url.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-07 18:47:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-07 18:47:24 -0400
commit3eef843e2e67d85ddc6b468f4c64890216fd7d0f (patch)
treeb0259cb3181f7af4c717ef7ff1589c92ea87aae2 /Utility/Url.hs
parentd81fd516eb3db88bc230b49c38064b434f8931bf (diff)
avoid using relative path from temp dir to dest file
That failed on OSX. The temp dir was /var/folders/fb/pnwjj52n7fg0r9mnvpsfll180000gr/T/downloadurl and the relative path ../../../../../../Volumes/Visitors/joeyh/git-annex/r/.git/... Didn't work. I have no clue why, how did OSX manage to break this? But, the relative path is longer most of the time anyway, so let's just use the absolute path.
Diffstat (limited to 'Utility/Url.hs')
-rw-r--r--Utility/Url.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 1d34b558f..9537e86b7 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -252,8 +252,8 @@ download' quiet url file uo = do
- and overwritten files in the current directory, even though
- it was asked to write to a file elsewhere. -}
go cmd opts = withTmpDir "downloadurl" $ \tmp -> do
- relfile <- relPathDirToFile tmp file
- let ps = addUserAgent uo $ reqParams uo++opts++[File relfile, File url]
+ absfile <- absPath file
+ let ps = addUserAgent uo $ reqParams uo++opts++[File absfile, File url]
boolSystem' cmd ps $ \p -> p { cwd = Just tmp }
quietopt s