maildir-save.c revision 7c95b03620a03a43dd72d39608cea5fc77393ad6
181N/A/* Copyright (C) 2002-2004 Timo Sirainen */ 181N/A /* if we have flags, we'll move it to cur/ directly, because files in 181N/A new/ directory can't have flags. alternative would be to write it 181N/A in new/ and set the flags dirty in index file, but in that case 181N/A external MUAs would see wrong flags. */ 448N/A "Not enough disk space");
181N/A /* create a new file in tmp/ directory */ 448N/A /*FIXME:if (!index_mailbox_fix_keywords(ibox, &mail_flags, 181N/A flags->keywords_count)) 181N/A /* now, we want to be able to rollback the whole append session, 448N/A so we'll just store the name of this temp file and move it later 181N/A into new/ or cur/. if dest_fname is NULL, it's moved to new/, 181N/A /* insert into index */ 181N/A /* tmp file creation failed */ 448N/A /* set the received_date by modifying mtime */ 448N/A /* FIXME: when saving multiple messages, we could get better 181N/A performance if we left the fd open and fsync()ed it later */ 181N/A /* delete the tmp file */ 181N/A "Not enough disk space");
181N/A /* try to unlink the mails already moved */ 181N/A /* error or timeout - our transaction is broken */ /* move them into new/ */ /* can't do anything anymore if we fail */ /* clean up the temp files */