mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-08 18:45:13 +00:00
fix incomplete copy/move (#75)
This commit is contained in:
parent
994141f852
commit
daaa37f3a7
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Unicode chars breaks the view [#71]
|
- Unicode chars breaks the view [#71]
|
||||||
|
- Copy/move incomplete (missing parts) [#75]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
@ -123,3 +124,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
[#41]: https://github.com/soywod/himalaya/issues/41
|
[#41]: https://github.com/soywod/himalaya/issues/41
|
||||||
[#61]: https://github.com/soywod/himalaya/issues/61
|
[#61]: https://github.com/soywod/himalaya/issues/61
|
||||||
[#71]: https://github.com/soywod/himalaya/issues/71
|
[#71]: https://github.com/soywod/himalaya/issues/71
|
||||||
|
[#75]: https://github.com/soywod/himalaya/issues/75
|
||||||
|
|
|
@ -435,7 +435,7 @@ pub fn msg_matches(matches: &ArgMatches) -> Result<()> {
|
||||||
let msg = Msg::from(imap_conn.read_msg(&mbox, &uid)?);
|
let msg = Msg::from(imap_conn.read_msg(&mbox, &uid)?);
|
||||||
let mut flags = msg.flags.deref().to_vec();
|
let mut flags = msg.flags.deref().to_vec();
|
||||||
flags.push(Flag::Seen);
|
flags.push(Flag::Seen);
|
||||||
imap_conn.append_msg(target, &msg.to_vec()?, &flags)?;
|
imap_conn.append_msg(target, &msg.raw, &flags)?;
|
||||||
imap_conn.logout();
|
imap_conn.logout();
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
@ -447,7 +447,7 @@ pub fn msg_matches(matches: &ArgMatches) -> Result<()> {
|
||||||
let msg = Msg::from(imap_conn.read_msg(&mbox, &uid)?);
|
let msg = Msg::from(imap_conn.read_msg(&mbox, &uid)?);
|
||||||
let mut flags = msg.flags.deref().to_vec();
|
let mut flags = msg.flags.deref().to_vec();
|
||||||
flags.push(Flag::Seen);
|
flags.push(Flag::Seen);
|
||||||
imap_conn.append_msg(target, &msg.to_vec()?, msg.flags.deref())?;
|
imap_conn.append_msg(target, &msg.raw, msg.flags.deref())?;
|
||||||
imap_conn.add_flags(mbox, uid, "\\Seen \\Deleted")?;
|
imap_conn.add_flags(mbox, uid, "\\Seen \\Deleted")?;
|
||||||
imap_conn.logout();
|
imap_conn.logout();
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
|
|
@ -182,7 +182,7 @@ pub struct Msg<'m> {
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing)]
|
||||||
pub attachments: Vec<String>,
|
pub attachments: Vec<String>,
|
||||||
#[serde(skip_serializing)]
|
#[serde(skip_serializing)]
|
||||||
raw: Vec<u8>,
|
pub raw: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'m> From<Vec<u8>> for Msg<'m> {
|
impl<'m> From<Vec<u8>> for Msg<'m> {
|
||||||
|
|
Loading…
Reference in a new issue