mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
change XMonad.Prompt.AppendFile
to use mkAbsolutePath
This commit is contained in:
@@ -30,6 +30,7 @@ module XMonad.Prompt.AppendFile (
|
||||
|
||||
import XMonad.Core
|
||||
import XMonad.Prompt
|
||||
import XMonad.Prelude (mkAbsolutePath)
|
||||
|
||||
import System.IO
|
||||
|
||||
@@ -91,4 +92,4 @@ appendFilePrompt' c trans fn = mkXPrompt (AppendFile fn)
|
||||
|
||||
-- | Append a string to a file.
|
||||
doAppend :: (String -> String) -> FilePath -> String -> X ()
|
||||
doAppend trans fn = io . withFile fn AppendMode . flip hPutStrLn . trans
|
||||
doAppend trans fn s = mkAbsolutePath fn >>= \f -> (io . withFile f AppendMode . flip hPutStrLn . trans) s
|
||||
|
Reference in New Issue
Block a user