Skip to content

Commit

Permalink
Remove broken feature mkdtemp
Browse files Browse the repository at this point in the history
  • Loading branch information
erebe committed May 27, 2021
1 parent 7e264bf commit 091c800
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import System.Environment (lookupEnv)
import System.IO (hClose, hGetContents)
import System.Timeout (timeout)
import System.Wordexp.Simple (wordexp)
import System.Posix.Temp (mkdtemp)
--import System.Posix.Temp (mkdtemp)

import Toml (TomlCodec, (.=))
import qualified Toml
Expand Down Expand Up @@ -271,11 +271,11 @@ getConfig = do

-- if it ends with / we don't create a temp directory
-- user is responsible for it
cfg <- if (lastDef ' ' (toS $ imageCachePath cfg) /= '/')
then do
dirPath <- mkdtemp $ (toS $ imageCachePath cfg)
return $ cfg { imageCachePath = toS dirPath }
else return cfg
-- cfg <- if (lastDef ' ' (toS $ imageCachePath cfg) /= '/')
-- then do
-- dirPath <- mkdtemp $ (toS $ imageCachePath cfg)
-- return $ cfg { imageCachePath = toS dirPath }
-- else return cfg

return cfg

Expand Down Expand Up @@ -303,7 +303,7 @@ run cmd = do
-- Should rename COPY into ADVERTISE but as greenclip is already used I don't want to break configs
-- of other people
COPY sel -> runReaderT (advertiseSelection sel) cfg
HELP -> putText $ "greenclip v4.1 -- Recyle your clipboard selections\n\n" <>
HELP -> putText $ "greenclip v4.2 -- Recyle your clipboard selections\n\n" <>
"Available commands\n" <>
"daemon: Spawn the daemon that will listen to selections\n" <>
"print: Display all selections history\n" <>
Expand Down

0 comments on commit 091c800

Please sign in to comment.