On Fri, May 09, 2008 at 03:09:22PM +0000, [EMAIL PROTECTED] wrote: > Note: I didn't know what to do about mk_stdout_temp > > Fri May 9 15:30:35 BST 2008 Eric Kow <[EMAIL PROTECTED]> > * Use System.Directory.getTemporaryDirectory to determine tmp location. > > This is more portable. For instance, it understands Windows's > conventions. > > Fri May 9 15:56:36 BST 2008 Eric Kow <[EMAIL PROTECTED]> > * Create temporary files with openBinaryTempFile. > Remove some mkstemp-related code which is no longer used.
> withTemp :: (String -> IO a) -> IO a > withTemp = bracket get_empty_file removeFileMayNotExist > - where get_empty_file = do (h,f) <- mkstemp "darcs" > + where get_empty_file = do (f,h) <- openBinaryTempFile "" "darcs" > hClose h > return f As far as I can tell, the behavior of openBinaryTempFile is undocumented when it is passed an empty string as a directory. Perhaps we should pass "."? David _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
