core: temp-folder option (#3905)

This commit is contained in:
spaced4ndy
2024-03-14 10:59:20 +04:00
committed by GitHub
parent 240ca30f91
commit f3eeb9dcc2
6 changed files with 15 additions and 2 deletions
+1
View File
@@ -207,6 +207,7 @@ mobileChatOpts dbFilePrefix =
chatCmdLog = CCLNone,
chatServerPort = Nothing,
optFilesFolder = Nothing,
optTempDirectory = Nothing,
showReactions = False,
allowInstantFiles = True,
autoAcceptFileSize = 0,
+9
View File
@@ -41,6 +41,7 @@ data ChatOpts = ChatOpts
chatCmdLog :: ChatCmdLog,
chatServerPort :: Maybe String,
optFilesFolder :: Maybe FilePath,
optTempDirectory :: Maybe FilePath,
showReactions :: Bool,
allowInstantFiles :: Bool,
autoAcceptFileSize :: Integer,
@@ -258,6 +259,13 @@ chatOptsP appDir defaultDbFileName = do
<> metavar "FOLDER"
<> help "Folder to use for sent and received files"
)
optTempDirectory <-
optional $
strOption
( long "temp-folder"
<> metavar "FOLDER"
<> help "Folder for temporary encrypted files (default: system temp directory)"
)
showReactions <-
switch
( long "reactions"
@@ -304,6 +312,7 @@ chatOptsP appDir defaultDbFileName = do
chatCmdLog,
chatServerPort,
optFilesFolder,
optTempDirectory,
showReactions,
allowInstantFiles,
autoAcceptFileSize,