maildir-copy.c revision 2968c03063b4c0203a4ae6c8d4493ac4377460ff
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "index-messageset.h"
#include "maildir-index.h"
#include "maildir-storage.h"
#include "mail-custom-flags.h"
#include <stdlib.h>
#include <unistd.h>
typedef struct {
int error;
const char **custom_flags;
unsigned int client_seq __attr_unused__,
{
const char *fname;
ctx->custom_flags))
return FALSE;
/* link the file */
return TRUE;
else {
}
return FALSE;
}
}
const char *messageset, int uidset)
{
int ret;
return mail_storage_set_index_error(src);
return mail_storage_set_index_error(src);
return mail_storage_set_index_error(dest);
}
copy_hard_func, &ctx);
}
const char *messageset, int uidset)
{
"Destination mailbox is read-only");
return FALSE;
}
/* both source and destination mailbox are in maildirs and
copy_with_hardlinks option is on, do it */
switch (maildir_copy_with_hardlinks(ibox,
case 1:
return TRUE;
case 0:
/* non-fatal hardlinking failure, try the slow way */
break;
default:
return FALSE;
}
}
}