Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/eb7194360baca9677eb45044e13e6a2cf9de942a

>---------------------------------------------------------------

commit eb7194360baca9677eb45044e13e6a2cf9de942a
Author: Jens Petersen <[email protected]>
Date:   Thu May 19 02:16:58 2011 +0000

    Add a dash separator for pid in createTempDirectory and openBinaryTempFile 
too

>---------------------------------------------------------------

 cabal/Distribution/Compat/TempFile.hs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cabal/Distribution/Compat/TempFile.hs 
b/cabal/Distribution/Compat/TempFile.hs
index d3b2129..9feddeb 100644
--- a/cabal/Distribution/Compat/TempFile.hs
+++ b/cabal/Distribution/Compat/TempFile.hs
@@ -89,7 +89,7 @@ openBinaryTempFile tmp_dir template
     (templateBase, templateExt) = splitExtension template
     findTempName :: Int -> IO (FilePath, Handle)
     findTempName x
-      = do let path = tmp_dir </> (templateBase ++ show x) <.> templateExt
+      = do let path = tmp_dir </> (templateBase ++ "-" ++ show x) <.> 
templateExt
            b  <- doesFileExist path
            if b then findTempName (x+1)
                 else do hnd <- openBinaryFile path ReadWriteMode
@@ -189,7 +189,7 @@ createTempDirectory dir template = do
   findTempName pid
   where
     findTempName x = do
-      let dirpath = dir </> template ++ show x
+      let dirpath = dir </> template ++ "-" ++ show x
       r <- tryIO $ mkPrivateDir dirpath
       case r of
         Right _ -> return dirpath



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to