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
831b1e65
...
831b1e6555af866d201df6e4951f42eb1e96a658
authored
2004-01-13 15:10:08 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(_mh_is_scheme): Use mu_scheme_autodetect_p().
1 parent
b1decbb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
mailbox/mh/folder.c
mailbox/mh/folder.c
View file @
831b1e6
...
...
@@ -86,24 +86,26 @@ mh_dir_p (const char *name)
static
int
_mh_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
mh_dir_p
(
url
);
return
mh_dir_p
(
path
);
}
return
0
;
...
...
Please
register
or
sign in
to post a comment