Re: [PATCH] Teach mailsplit about Maildir's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Fernando J. Pereda" <ferdy@xxxxxxxxxx> writes:

> -	ret = split_mbox(argp, dir, allow_bare, nr_prec, nr);
> +	while (*argp) {
> +		const char *arg = *argp++;
> +		struct stat argstat;
> +
> +		if (arg[0] == '-' && arg[1] == 0) {
> +			ret |= split_mbox(arg, dir, allow_bare, nr_prec, nr);
> +			continue;
> +		}
> +
> +		if (stat(arg, &argstat) == -1) {
> +			error("cannot stat %s (%s)", arg, strerror(errno));
> +			return 1;
> +		}
> +
> +		if (S_ISDIR(argstat.st_mode))
> +			ret |= split_maildir(arg, dir, nr_prec, nr);
> +		else
> +			ret |= split_mbox(arg, dir, allow_bare, nr_prec, nr);
> +	}
> +
>  	if (ret != -1)
>  		printf("%d\n", ret);
>  

No kidding.  ret |= stuff and then printf("%d\n", ret) would not
give us the number of commit e-mails on the standard output.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux