diff options
| author | Sam Varshavchik | 2017-12-26 07:44:38 -0500 | 
|---|---|---|
| committer | Sam Varshavchik | 2017-12-26 07:44:38 -0500 | 
| commit | 60586311ac65a7e1f6acb5869f5d9174d597d8c7 (patch) | |
| tree | 270614d3b994c07c103a2a315a2f64b099f5189e /maildir/maildirmake.c | |
| parent | a8d82c4d83467ac95990f229f031606464c5296f (diff) | |
| download | courier-libs-60586311ac65a7e1f6acb5869f5d9174d597d8c7.tar.bz2 | |
Fix maildirmake and reformime bugs.
2017-12-26  Sam Varshavchik  <mrsam@courier-mta.com>
	* libs/maildir/maildirmake.c (main): maildirmake's -q option
	will create the maildir if it does not exist.
	* libs/rfc2045/reformime.c (main2): Added -rU option, and a new
	internal RFC2045_RW_8BIT_ALWAYS conversion option.
	* libs/rfc2045/reformime.c (main2): Fix crash when the -s option
	is not valid.
Diffstat (limited to 'maildir/maildirmake.c')
| -rw-r--r-- | maildir/maildirmake.c | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/maildir/maildirmake.c b/maildir/maildirmake.c index a106894..9e14eb4 100644 --- a/maildir/maildirmake.c +++ b/maildir/maildirmake.c @@ -336,6 +336,19 @@ char	*tmp=0;  	if (quota)  	{ +		struct stat stat_buf; + +		if (stat(maildir, &stat_buf) < 0 && errno == ENOENT) +		{ +			if (maildir_make(maildir, perm & ~0022, +					 (perm & ~0022), +					 0) < 0) +			{ +				perror(maildir); +				exit(1); +			} +		} +  		maildir_quota_set(maildir, quota);  		exit(0);  	} | 
