diff options
Diffstat (limited to 'src/cmd/move.rs')
-rw-r--r-- | src/cmd/move.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cmd/move.rs b/src/cmd/move.rs index c852d6c..7fc762f 100644 --- a/src/cmd/move.rs +++ b/src/cmd/move.rs @@ -11,7 +11,17 @@ pub fn r#move( if let Some(p) = ms.maildir_path.read().unwrap().clone() { let from = open_submaildir(p.clone(), &from_folder); let to = open_submaildir(p, &to_folder); - from.move_to(&mid, &to).unwrap(); + if from.move_to(&mid, &to).is_err() { + // This is not neccessarily true! + // The error needs to be investigated to find out the actual cause. + // + // Other plausible causes: + // + // InvalidFolder(folder: from_folder) + // InvalidMid(folder: from_folder, mid: mid) + // + return call.reply_invalid_folder(to_folder); + } call.reply() } else { call.reply_not_initialized() |