[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] proftpd/src fsio.c,1.102.2.13,1.102.2.14
From:       TJ Saunders <castaglia () users ! sourceforge ! net>
Date:       2014-02-11 15:21:38
Message-ID: E1WDF9Y-0003ho-B7 () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/src
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4981/src

Modified Files:
      Tag: B1_3_4
	fsio.c 
Log Message:

Backport of fix for Bug#4022 to 1.3.4 branch.


Index: fsio.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/src/fsio.c,v
retrieving revision 1.102.2.13
retrieving revision 1.102.2.14
diff -u -d -r1.102.2.13 -r1.102.2.14
--- fsio.c	15 Oct 2013 04:50:58 -0000	1.102.2.13
+++ fsio.c	11 Feb 2014 15:21:36 -0000	1.102.2.14
@@ -2,7 +2,7 @@
  * ProFTPD - FTP server daemon
  * Copyright (c) 1997, 1998 Public Flood Software
  * Copyright (C) 1999, 2000 MacGyver aka Habeeb J. Dihu <macgyver@tos.net>
- * Copyright (C) 2001-2013 The ProFTPD Project
+ * Copyright (C) 2001-2014 The ProFTPD Project
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -2837,11 +2837,22 @@
     if (res < 0) {
       xerrno = errno;
 
-      pr_log_pri(PR_LOG_WARNING, "renaming '%s' to '%s' failed: %s", tmpl_path,
+      pr_log_pri(PR_LOG_INFO, "renaming '%s' to '%s' failed: %s", tmpl_path,
         path, strerror(xerrno));
 
       (void) rmdir(tmpl_path);
-    
+
+#ifdef ENOTEMPTY
+      if (xerrno == ENOTEMPTY) {
+        /* If the rename(2) failed with "Directory not empty" (ENOTEMPTY),
+         * then change the errno to "File exists" (EEXIST), so that the
+         * error reported to the client is more indicative of the actual
+         * cause.
+        */
+        xerrno = EEXIST;
+      }
+#endif /* ENOTEMPTY */
+
       errno = xerrno;
       return -1;
     }


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic