Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > e77f89c6f9495a43cdad1c748dfdc5a0 > files > 1

pandoc-1.8.2.1-5.fc16.src.rpm

--- pandoc-1.8.2.1/src/markdown2pdf.hs~	2011-08-02 03:02:52.000000000 +0900
+++ pandoc-1.8.2.1/src/markdown2pdf.hs	2011-12-22 12:08:02.528735085 +0900
@@ -173,8 +173,12 @@
 
 saveOutput :: FilePath -> FilePath -> IO ()
 saveOutput input output = do
-  copyFile (encodeString input) (encodeString output)
-  UTF8.hPutStrLn stderr $! "Created " ++ output
+  inExists <- doesFileExist (encodeString input)
+  when inExists $
+    copyFile (encodeString input) (encodeString output)
+  outExists <- doesFileExist (encodeString input)
+  when outExists $
+    UTF8.hPutStrLn stderr $! "Created " ++ output
 
 main :: IO ()
 main = bracket