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
c78ceb5d
...
c78ceb5d286ca8704b6ac358a9c44b9bbcd723d1
authored
2016-11-29 11:13:04 +0200
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Remove compatibility support for obsolete .mu-size
1 parent
6efafc3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
42 deletions
include/mailutils/sys/amd.h
libmailutils/base/amd.c
include/mailutils/sys/amd.h
View file @
c78ceb5
...
...
@@ -48,8 +48,6 @@
#define _MU_AMD_PROP_SIZE "size"
#define _MU_AMD_PROP_FILE_NAME ".mu-prop"
/* Legacy (2.x) size file name */
#define _MU_AMD_SIZE_FILE_NAME ".mu-size"
struct
_amd_data
;
struct
_amd_message
...
...
libmailutils/base/amd.c
View file @
c78ceb5
...
...
@@ -216,34 +216,6 @@ _amd_prop_store_off (struct _amd_data *amd, const char *name, mu_off_t val)
return
mu_property_set_value
(
amd
->
prop
,
name
,
p
,
1
);
}
/* Backward-compatible size file support */
static
int
read_size_file
(
struct
_amd_data
*
amd
)
{
FILE
*
fp
;
int
rc
;
char
*
name
=
mu_make_file_name
(
amd
->
name
,
_MU_AMD_SIZE_FILE_NAME
);
if
(
!
name
)
return
1
;
fp
=
fopen
(
name
,
"r"
);
if
(
fp
)
{
unsigned
long
size
;
if
(
fscanf
(
fp
,
"%lu"
,
&
size
)
==
1
)
{
rc
=
_amd_prop_store_off
(
amd
,
_MU_AMD_PROP_SIZE
,
size
);
}
else
rc
=
1
;
fclose
(
fp
);
unlink
(
name
);
}
else
rc
=
1
;
free
(
name
);
return
rc
;
}
static
int
_amd_prop_create
(
struct
_amd_data
*
amd
)
{
...
...
@@ -267,8 +239,7 @@ _amd_prop_create (struct _amd_data *amd)
free
(
mhprop
->
filename
);
free
(
mhprop
);
}
else
read_size_file
(
amd
);
return
rc
;
}
...
...
@@ -1246,20 +1217,11 @@ amd_remove_mbox (mu_mailbox_t mailbox)
{
char
*
name
;
name
=
mu_make_file_name
(
amd
->
name
,
_MU_AMD_
SIZE
_FILE_NAME
);
name
=
mu_make_file_name
(
amd
->
name
,
_MU_AMD_
PROP
_FILE_NAME
);
if
(
!
name
)
return
ENOMEM
;
if
(
unlink
(
name
)
&&
errno
!=
ENOENT
)
rc
=
errno
;
else
{
free
(
name
);
name
=
mu_make_file_name
(
amd
->
name
,
_MU_AMD_PROP_FILE_NAME
);
if
(
!
name
)
return
ENOMEM
;
if
(
unlink
(
name
)
&&
errno
!=
ENOENT
)
rc
=
errno
;
}
free
(
name
);
}
...
...
Please
register
or
sign in
to post a comment