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
d164254b
...
d164254b12816149866b076cab4cd10f4a2ba3c4
authored
2006-12-29 13:13:12 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(amd_open): Create directory if MU_STREAM_CREAT is given.
1 parent
956a3c65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
mailbox/amd.c
mailbox/amd.c
View file @
d164254
...
...
@@ -332,8 +332,18 @@ amd_open (mu_mailbox_t mailbox, int flags)
mailbox
->
flags
=
flags
;
if
(
stat
(
amd
->
name
,
&
st
)
<
0
)
return
errno
;
{
if
((
flags
&
MU_STREAM_CREAT
)
&&
errno
==
ENOENT
)
{
if
(
mkdir
(
amd
->
name
,
S_IRUSR
|
S_IWUSR
|
S_IXUSR
))
return
errno
;
if
(
stat
(
amd
->
name
,
&
st
)
<
0
)
return
errno
;
}
else
return
errno
;
}
if
(
!
S_ISDIR
(
st
.
st_mode
))
return
EINVAL
;
...
...
Please
register
or
sign in
to post a comment