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
b1decbb5
...
b1decbb5cdb05ca64fb29d4482362f38060ca8db
authored
2004-01-13 15:09:50 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(_maildir_is_scheme): Use mu_scheme_autodetect_p().
1 parent
76017b8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
mailbox/maildir/folder.c
mailbox/maildir/folder.c
View file @
b1decbb
...
...
@@ -55,26 +55,28 @@ dir_exists (const char *name, const char *suf)
static
int
_maildir_is_scheme
(
record_t
record
,
const
char
*
url
)
{
const
char
*
path
;
if
(
!
url
||
!
record
->
scheme
)
return
0
;
if
(
strncmp
(
record
->
scheme
,
url
,
strlen
(
record
->
scheme
))
==
0
)
return
1
;
if
(
strncmp
(
MU_PATH_SCHEME
,
url
,
MU_PATH_SCHEME_LEN
)
==
0
)
if
(
mu_scheme_autodetect_p
(
url
,
&
path
)
)
{
/* Attemp auto-detection */
struct
stat
st
;
if
(
stat
(
url
,
&
st
)
<
0
)
if
(
stat
(
path
,
&
st
)
<
0
)
return
1
;
/* mailbox_open will complain */
if
(
!
S_ISDIR
(
st
.
st_mode
))
return
0
;
return
dir_exists
(
url
,
TMPSUF
)
&&
dir_exists
(
url
,
CURSUF
)
&&
dir_exists
(
url
,
NEWSUF
);
return
dir_exists
(
path
,
TMPSUF
)
&&
dir_exists
(
path
,
CURSUF
)
&&
dir_exists
(
path
,
NEWSUF
);
}
return
0
;
}
...
...
Please
register
or
sign in
to post a comment