Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
814b74eb
...
814b74eb4044bffa0c7c6c06ca986017f9128dee
authored
2001-07-09 07:52:36 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Raise hold flag when not closing system mailbox (%).
1 parent
bca90bac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
mail/quit.c
mail/quit.c
View file @
814b74e
...
...
@@ -61,6 +61,25 @@ mail_mbox_commit ()
attribute_t
attr
;
int
keepsave
=
util_find_env
(
"keepsave"
)
->
set
;
int
hold
=
util_find_env
(
"hold"
)
->
set
;
url_t
url
;
int
is_user_mbox
;
mailbox_get_url
(
mbox
,
&
url
);
is_user_mbox
=
strcmp
(
url_to_string
(
url
),
getenv
(
"MBOX"
))
==
0
;
{
mailbox_t
mb
;
url_t
u
;
mailbox_create_default
(
&
mb
,
NULL
);
mailbox_get_url
(
mbox
,
&
u
);
if
(
strcmp
(
url_to_string
(
u
),
url_to_string
(
url
))
!=
0
)
{
/* The mailbox we are closing is not a system one (%). Raise
hold flag */
hold
=
1
;
}
mailbox_destroy
(
&
mb
);
}
for
(
i
=
1
;
i
<=
total
;
i
++
)
{
...
...
@@ -70,8 +89,10 @@ mail_mbox_commit ()
return
1
;
}
message_get_attribute
(
msg
,
&
attr
);
if
(
attribute_is_userflag
(
attr
,
MAIL_ATTRIBUTE_MBOXED
)
||
(
!
hold
&&
attribute_is_seen
(
attr
)))
if
(
!
is_user_mbox
&&
(
attribute_is_userflag
(
attr
,
MAIL_ATTRIBUTE_MBOXED
)
||
(
!
hold
&&
attribute_is_read
(
attr
))))
{
if
(
!
dest_mbox
)
{
...
...
@@ -92,8 +113,8 @@ mail_mbox_commit ()
}
else
if
(
!
keepsave
&&
attribute_is_userflag
(
attr
,
MAIL_ATTRIBUTE_SAVED
))
attribute_set_deleted
(
attr
);
else
if
(
attribute_is_
seen
(
attr
))
attribute_set_
read
(
attr
);
else
if
(
attribute_is_
read
(
attr
))
attribute_set_
seen
(
attr
);
}
if
(
saved_count
)
...
...
Please
register
or
sign in
to post a comment