[dovecot-cvs] dovecot/src/lib-storage/subscription-file subscription-file.c,1.11,1.12
cras at procontrol.fi
cras at procontrol.fi
Tue Dec 17 12:33:32 EET 2002
Update of /home/cvs/dovecot/src/lib-storage/subscription-file
In directory danu:/tmp/cvs-serv18420/lib-storage/subscription-file
Modified Files:
subscription-file.c
Log Message:
LSUB failed if there was no subscriptions file.
Index: subscription-file.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/subscription-file/subscription-file.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- subscription-file.c 3 Dec 2002 22:44:38 -0000 1.11
+++ subscription-file.c 17 Dec 2002 10:33:30 -0000 1.12
@@ -37,9 +37,12 @@
fd = update ? open(*path, O_RDWR | O_CREAT, 0660) :
open(*path, O_RDONLY);
if (fd == -1) {
- if (update || errno != ENOENT)
+ if (update || errno != ENOENT) {
subsfile_set_syscall_error(storage, "open()", *path);
- return -1;
+ return -1;
+ }
+
+ return -2;
}
/* FIXME: we should work without locking, rename() would be easiest
@@ -173,8 +176,10 @@
int fd, ret;
fd = subscription_open(storage, FALSE, &path, &mmap_base, &mmap_length);
- if (fd == -1)
- return -1;
+ if (fd < 0) {
+ /* -2 = no subscription file, ignore */
+ return fd == -1 ? -1 : 1;
+ }
glob = imap_match_init(mask, TRUE, storage->hierarchy_sep);
More information about the dovecot-cvs
mailing list