From 3eef843e2e67d85ddc6b468f4c64890216fd7d0f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 7 May 2015 18:47:24 -0400 Subject: 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. --- Utility/Url.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Utility/Url.hs') 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 -- cgit v1.2.3