dovecot-2.2-pigeonhole: lib-sieve-tool: Simplified seekable stre...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Tue Oct 7 21:13:02 UTC 2014
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/54c54979eb5b
changeset: 1917:54c54979eb5b
user: Stephan Bosch <stephan at rename-it.nl>
date: Tue Oct 07 23:12:20 2014 +0200
description:
lib-sieve-tool: Simplified seekable stream callback for raw mail.
No longer needed to create the temp directory.
diffstat:
src/lib-sieve-tool/mail-raw.c | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
diffs (38 lines):
diff -r ce0657ede24e -r 54c54979eb5b src/lib-sieve-tool/mail-raw.c
--- a/src/lib-sieve-tool/mail-raw.c Fri Sep 12 12:17:38 2014 +0200
+++ b/src/lib-sieve-tool/mail-raw.c Tue Oct 07 23:12:20 2014 +0200
@@ -9,7 +9,6 @@
#include "str-sanitize.h"
#include "strescape.h"
#include "safe-mkstemp.h"
-#include "mkdir-parents.h"
#include "abspath.h"
#include "message-address.h"
#include "mbox-from.h"
@@ -58,26 +57,12 @@
(const char **path_r, void *context)
{
struct mail_user *ruser = (struct mail_user *)context;
- const char *dir, *p;
string_t *path;
int fd;
path = t_str_new(128);
mail_user_set_get_temp_prefix(path, ruser->set);
fd = safe_mkstemp(path, 0600, (uid_t)-1, (gid_t)-1);
- if (fd == -1 && errno == ENOENT) {
- dir = str_c(path);
- p = strrchr(dir, '/');
- if (p != NULL) {
- dir = t_strdup_until(dir, p);
- if ( mkdir_parents(dir, 0600) < 0 ) {
- i_error("mkdir_parents(%s) failed: %m", dir);
- return -1;
- }
- fd = safe_mkstemp(path, 0600, (uid_t)-1, (gid_t)-1);
- }
- }
-
if (fd == -1) {
i_error("safe_mkstemp(%s) failed: %m", str_c(path));
return -1;
More information about the dovecot-cvs
mailing list