mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-05 21:40:05 +00:00
create appDir if absent (#79)
This commit is contained in:
@@ -11,7 +11,7 @@ import Data.Char (toLower)
|
||||
import Data.List (isInfixOf)
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import System.Directory (doesFileExist, getAppUserDataDirectory)
|
||||
import System.Directory (createDirectoryIfMissing, doesFileExist, getAppUserDataDirectory)
|
||||
import System.FilePath (combine)
|
||||
import System.Info (os)
|
||||
import System.Process (readCreateProcess, shell)
|
||||
@@ -51,6 +51,7 @@ winScript path Notification {title, text} = "powershell.exe \"" <> T.pack path <
|
||||
savePowershellScript :: IO FilePath
|
||||
savePowershellScript = do
|
||||
appDir <- getAppUserDataDirectory "simplex"
|
||||
createDirectoryIfMissing False appDir
|
||||
let psScript = combine appDir "win-toast-notify.ps1"
|
||||
writeFile
|
||||
psScript
|
||||
|
||||
Reference in New Issue
Block a user