summaryrefslogtreecommitdiff
path: root/imap/src/osdep/unix/unix.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-07-26 08:29:05 -0600
committerEduardo Chappa <chappa@washington.edu>2015-07-26 08:29:05 -0600
commit7c946bfafe961c1dda51d19b5c29a5600ef1e5ec (patch)
tree608ff1bdeafce3223747418560cb39e045a5683f /imap/src/osdep/unix/unix.c
parent9306e227fc7b1b096d4a58f8c06da66603a50a6a (diff)
downloadalpine-7c946bfafe961c1dda51d19b5c29a5600ef1e5ec.tar.xz
* Fix compilation error in arg.c when pwdcertdir was being freed, even
though a password file might have not been defined. * Work on reducing the number of warnings in OSX.
Diffstat (limited to 'imap/src/osdep/unix/unix.c')
-rw-r--r--imap/src/osdep/unix/unix.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/imap/src/osdep/unix/unix.c b/imap/src/osdep/unix/unix.c
index 8bca508c..cda5798c 100644
--- a/imap/src/osdep/unix/unix.c
+++ b/imap/src/osdep/unix/unix.c
@@ -398,15 +398,16 @@ long unix_rename (MAILSTREAM *stream,char *old,char *newname)
MM_CRITICAL (stream); /* get the c-client lock */
if (!dummy_file (file,old) ||
(newname && (!((s = mailboxfile (tmp,newname)) && *s) ||
- ((s = strrchr (tmp,'/')) && !s[1]))))
- sprintf (tmp,newname ?
- "Can't rename mailbox %.80s to %.80s: invalid name" :
- "Can't delete mailbox %.80s: invalid name",
+ ((s = strrchr (tmp,'/')) && !s[1])))){
+ if(newname)
+ sprintf (tmp, "Can't rename mailbox %.80s to %.80s: invalid name",
old,newname);
+ else
+ sprintf (tmp, "Can't delete mailbox %.80s: invalid name",old);
/* lock out other c-clients */
- else if ((ld = lockname (lock,file,LOCK_EX|LOCK_NB,&i)) < 0)
+ } else if ((ld = lockname (lock,file,LOCK_EX|LOCK_NB,&i)) < 0)
sprintf (tmp,"Mailbox %.80s is in use by another process",old);
-
+
else {
if ((fd = unix_lock (file,O_RDWR,
(long) mail_parameters (NIL,GET_MBXPROTECTION,NIL),