@@ -75,9 +75,11 @@ getT2TMeta inps out = do
7575 curDate <- formatTime defaultTimeLocale "%F" <$> getZonedTime
7676 let getModTime = fmap (formatTime defaultTimeLocale "%T") .
7777 getModificationTime
78− curMtime <- catchIOError
79− (maximum <$> mapM getModTime inps)
80− (const (return ""))
78+ curMtime <- case inps of
79+ [] -> formatTime defaultTimeLocale "%T" <$> getZonedTime
80+ _ -> catchIOError
81+ (maximum <$> mapM getModTime inps)
82+ (const (return ""))
8183 return $ T2TMeta curDate curMtime (intercalate ", " inps) out
8284
8385-- | Read Txt2Tags from an input string returning a Pandoc document