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 | |
| 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')
| -rw-r--r-- | maildir/maildirmake.c | 13 | ||||
| -rw-r--r-- | maildir/maildirmake.sgml | 8 | 
2 files changed, 19 insertions, 2 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);  	} diff --git a/maildir/maildirmake.sgml b/maildir/maildirmake.sgml index 1d90554..b1a7d6d 100644 --- a/maildir/maildirmake.sgml +++ b/maildir/maildirmake.sgml @@ -51,8 +51,12 @@ folders.</simpara>      <variablelist>        <varlistentry><term><literal>-q</literal> <replaceable>quota</replaceable></term>          <listitem><simpara>install a quota on the maildir. -See -<ulink url="maildirquota.html"><citerefentry><refentrytitle>maildirquota</refentrytitle><manvolnum>7</manvolnum></citerefentry></ulink>, below.</simpara> +	    See +	    <ulink url="maildirquota.html"><citerefentry><refentrytitle>maildirquota</refentrytitle><manvolnum>7</manvolnum></citerefentry></ulink> +	    for more information. +	    The specified maildir gets automatically created if it does not +	    exist; otherwise the existing maildir's quota gets updated. +	  </simpara>  	</listitem>        </varlistentry>      </variablelist> | 
