Fix checking for file existence only when the options are set.

main
KKlochko 2 years ago
parent 79a498022e
commit 871fc3ed55

@ -69,10 +69,12 @@
(map-has-keys? options [:message, :message-file])
{:exit-message (error-msg ["You can't use message and message-file options at the same time!!!"])}
(file/is-file-not-exists? (:message-file options))
(and (contains? options :message-file)
(file/is-file-not-exists? (:message-file options)))
{:exit-message (error-msg ["Please, check the path to the message file!!!"])}
(file/is-file-exists? (:output-file options))
(and (contains? options :output-file)
(file/is-file-exists? (:output-file options)))
{:exit-message (error-msg ["Please, choose another file!!! Overwriting was prevented!!!"])}
(and (map-has-keys? options [:cipher, :key])

Loading…
Cancel
Save