diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-23 09:30:23 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-23 09:30:23 +0300 |
commit | 26e4d50b402213c07c7d492ace8d6cd2e88a816d (patch) | |
tree | db617824fc0244b72bc2a3abd2e729a17fdfa53d /ui/src/components/mail/view | |
parent | ed248be03179f0d188d0fff7f7fc7ea5647262e4 (diff) |
Try to save sent messages elsewhere if Sent folder fails
If Sent folder wasn't correctly configured, the sent message would be
lost. With this change it tries these folders in this order:
1. Sent
2. Inbox
3. Any other normal folder
The check is done by looking at the special usage metadata on each
folder. If everything fails, the message is saved in a file in the
tmpfs.
Diffstat (limited to 'ui/src/components/mail/view')
-rw-r--r-- | ui/src/components/mail/view/envelope.rs | 1 | ||||
-rw-r--r-- | ui/src/components/mail/view/html.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/components/mail/view/envelope.rs b/ui/src/components/mail/view/envelope.rs index a614a21c..a9cfd626 100644 --- a/ui/src/components/mail/view/envelope.rs +++ b/ui/src/components/mail/view/envelope.rs @@ -448,6 +448,7 @@ impl Component for EnvelopeView { &decode(u, None), name.as_ref().map(|n| n.clone()), None, + true, ); Command::new(&binary) .arg(p.path()) diff --git a/ui/src/components/mail/view/html.rs b/ui/src/components/mail/view/html.rs index 97ee5aba..26666e78 100644 --- a/ui/src/components/mail/view/html.rs +++ b/ui/src/components/mail/view/html.rs @@ -134,7 +134,7 @@ impl Component for HtmlView { // scripts) let binary = query_default_app("text/html"); if let Ok(binary) = binary { - let p = create_temp_file(&self.bytes, None, None); + let p = create_temp_file(&self.bytes, None, None, true); Command::new(&binary) .arg(p.path()) .stdin(Stdio::piped()) |