aboutsummaryrefslogtreecommitdiff
path: root/Utility/Tmp.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-29 15:21:02 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-29 15:21:02 -0400
commite128cc828b5d601e7a24c21689f38fe3bb54bbd8 (patch)
treece34cbff1c25273a9f5ce3c0f91b15e560e4af03 /Utility/Tmp.hs
parent2f4061cce0eb1189d194cef6ef2e446da53cd854 (diff)
change a few renameFile's to rename
AFAIK, none of these ever operate on directories, but nor do I want to explicitly check if they're files and fail if not.
Diffstat (limited to 'Utility/Tmp.hs')
-rw-r--r--Utility/Tmp.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Utility/Tmp.hs b/Utility/Tmp.hs
index 891ce5083..f46e1a5ee 100644
--- a/Utility/Tmp.hs
+++ b/Utility/Tmp.hs
@@ -13,10 +13,11 @@ import Control.Exception (bracket)
import System.IO
import System.Directory
import Control.Monad.IfElse
+import System.FilePath
import Utility.Exception
-import System.FilePath
import Utility.FileSystemEncoding
+import Utility.PosixFiles
type Template = String
@@ -30,7 +31,7 @@ viaTmp a file content = do
(tmpfile, handle) <- openTempFile dir (base ++ ".tmp")
hClose handle
a tmpfile content
- renameFile tmpfile file
+ rename tmpfile file
{- Runs an action with a tmp file located in the system's tmp directory
- (or in "." if there is none) then removes the file. -}