mirror of https://github.com/djcb/mu.git
lib: use flags_maildir_file
It's a better name. And fix some typos.
This commit is contained in:
parent
2d20074b99
commit
5d37c18d7d
|
@ -138,7 +138,6 @@ test_flags_from_delta_expr()
|
|||
"-S", Flags::Seen).value() ==
|
||||
Flags::Unread);
|
||||
|
||||
|
||||
static_assert(flags_from_delta_expr("+R+P-F", Flags::Seen).value() ==
|
||||
(Flags::Seen|Flags::Passed|Flags::Replied));
|
||||
/* '-B' is invalid */
|
||||
|
|
|
@ -144,7 +144,6 @@ constexpr std::array<MessageFlagInfo, 14> AllMessageFlagInfos = {{
|
|||
MessageFlagInfo{Flags::HasAttachment,'a', "attach", MessageFlagCategory::Content,
|
||||
"Has at least one attachment"
|
||||
},
|
||||
|
||||
MessageFlagInfo{Flags::Unread, 'u', "unread", MessageFlagCategory::Pseudo,
|
||||
"New or not seen message"
|
||||
},
|
||||
|
@ -289,9 +288,9 @@ flags_from_absolute_expr(std::string_view expr, bool ignore_invalid = false)
|
|||
* @param expr delta expression
|
||||
* @param flags existing flags
|
||||
* @param ignore_invalid if @true, ignore invalid flags, otherwise return
|
||||
* nullopt if an invalid flag is encountered
|
||||
* Nothing if an invalid flag is encountered
|
||||
*
|
||||
* @return new flags, or nullopt in case of error
|
||||
* @return new flags, or Nothing in case of error
|
||||
*/
|
||||
constexpr Option<Flags>
|
||||
flags_from_delta_expr(std::string_view expr, Flags flags,
|
||||
|
@ -317,7 +316,6 @@ flags_from_delta_expr(std::string_view expr, Flags flags,
|
|||
}
|
||||
|
||||
return imply_unread(flags);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -366,7 +364,7 @@ flags_filter(Flags flags, MessageFlagCategory cat)
|
|||
* @return filtered flags
|
||||
*/
|
||||
constexpr Flags
|
||||
flags_mail_dir_file(Flags flags)
|
||||
flags_maildir_file(Flags flags)
|
||||
{
|
||||
for (auto&& info : AllMessageFlagInfos)
|
||||
if (info.category != MessageFlagCategory::Maildir &&
|
||||
|
|
|
@ -421,7 +421,7 @@ Mu::maildir_determine_target(const std::string& old_path,
|
|||
Flags newflags,
|
||||
bool new_name)
|
||||
{
|
||||
newflags = flags_mail_dir_file(newflags); // filter out irrelevant flags.
|
||||
newflags = flags_maildir_file(newflags); // filter out irrelevant flags.
|
||||
|
||||
/* sanity checks */
|
||||
if (const auto checked{check_determine_target_params(
|
||||
|
|
|
@ -94,7 +94,7 @@ Result<void> maildir_move_message(const std::string& oldpath,
|
|||
*
|
||||
* @param old_path an absolute file system path to an existing message in an
|
||||
* actual maildir
|
||||
* @param root_maildir_path the absolete file system path under which
|
||||
* @param root_maildir_path the absolute file system path under which
|
||||
* all maildirs live.
|
||||
* @param target_maildir the target maildir; note that this the base-level
|
||||
* Maildir, ie. /home/user/Maildir/archive, and must _not_ include the
|
||||
|
@ -102,8 +102,8 @@ Result<void> maildir_move_message(const std::string& oldpath,
|
|||
* same filesystem. Can be empty if the message should not be moved to
|
||||
* a different maildir; note that this may still involve a
|
||||
* move to another directory (say, from new/ to cur/)
|
||||
* @param flags to set for the target (influences the filename, path). Any none-Maildir/File
|
||||
* flags are ignored.
|
||||
* @param flags to set for the target (influences the filename, path).
|
||||
* Any non-Maildir/File flags are ignored.
|
||||
* @param new_name whether to change the basename of the file
|
||||
*
|
||||
* @return Full path name of the target file or an Error
|
||||
|
|
Loading…
Reference in New Issue