summaryrefslogtreecommitdiff
path: root/src/markdown2pdf.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-11-22 18:07:33 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-11-22 18:07:33 +0000
commit81c3bd6a54bc4cc878446af5a932be2e49c5a788 (patch)
tree6f2c3768c80a852cd1b0ce02c5efe1324cbddcce /src/markdown2pdf.hs
parent4c387a4bc755ea3531787e2e51a6b83a9473259e (diff)
Modified markdown2pdf so as not to create a backup file.
Resolves Issue #166. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1624 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/markdown2pdf.hs')
-rw-r--r--src/markdown2pdf.hs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/markdown2pdf.hs b/src/markdown2pdf.hs
index 038549180..79cd09a2d 100644
--- a/src/markdown2pdf.hs
+++ b/src/markdown2pdf.hs
@@ -3,7 +3,7 @@ module Main where
import Data.List (isInfixOf, intercalate, isPrefixOf)
import Data.Maybe (isNothing)
-import Control.Monad (when, unless, guard)
+import Control.Monad (unless, guard)
import Control.Exception (tryJust, bracket)
import System.IO (stderr)
@@ -129,13 +129,8 @@ saveStdin file = do
saveOutput :: FilePath -> FilePath -> IO ()
saveOutput input output = do
- outputExist <- doesFileExist output
- when outputExist $ do
- let output' = output ++ "~"
- renameFile output output'
- putStrLn $! "Created backup file " ++ output'
copyFile input output
- putStrLn $! "Created " ++ output
+ hPutStrLn stderr $! "Created " ++ output
main :: IO ()
main = bracket