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
704ab2ff
...
704ab2ffdde38a16a6bb0fb19e288db7049f6097
authored
2003-02-22 22:25:53 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(plus_expand): Bugfix
1 parent
e7730fe5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
mailbox/mbx_default.c
mailbox/mbx_default.c
View file @
704ab2f
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001
, 2003
Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -43,6 +43,15 @@ const char *mu_path_folder_dir = "Mail";
#define USE_ENVIRON 1
static
int
is_proto
(
char
*
p
)
{
for
(;
*
p
&&
*
p
!=
'/'
;
p
++
)
if
(
*
p
==
':'
)
return
1
;
return
0
;
}
static
int
split_shortcut
(
const
char
*
file
,
const
char
pfx
[],
char
**
user
,
char
**
rest
)
{
*
user
=
NULL
;
...
...
@@ -175,7 +184,7 @@ plus_expand (const char *file, char **buf)
char
*
home
;
int
status
,
len
;
if
((
status
=
split_shortcut
(
file
,
"+="
,
&
user
,
&
path
)))
if
((
status
=
split_shortcut
(
file
,
"+="
,
&
path
,
&
user
)))
return
status
;
if
(
!
path
)
...
...
@@ -192,7 +201,7 @@ plus_expand (const char *file, char **buf)
return
ENOENT
;
}
if
(
mu_path_folder_dir
[
0
]
==
'/'
)
if
(
mu_path_folder_dir
[
0
]
==
'/'
||
is_proto
(
mu_path_folder_dir
)
)
{
len
=
strlen
(
mu_path_folder_dir
)
+
strlen
(
path
)
+
2
;
*
buf
=
malloc
(
len
);
...
...
@@ -334,7 +343,7 @@ mailbox_create_default (mailbox_t *pmbox, const char *mail)
break
;
default:
if
(
!
strchr
(
mail
,
':'
))
if
(
!
is_proto
(
mail
))
{
tmp_mbox
=
mu_getcwd
();
mbox
=
malloc
(
strlen
(
tmp_mbox
)
+
strlen
(
mail
)
+
2
);
...
...
Please
register
or
sign in
to post a comment