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

List:       proftpd-committers
Subject:    [ProFTPD-committers] proftpd/src fsio.c,1.158,1.159
From:       TJ Saunders <castaglia () users ! sourceforge ! net>
Date:       2014-02-11 15:17:56
Message-ID: E1WDF5x-0004fj-GI () sfs-ml-4 ! 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-serv4436/src

Modified Files:
	fsio.c 
Log Message:

Bug#4022 - "Directory not empty" error when creating directory is misleading.


Index: fsio.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/src/fsio.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- fsio.c	9 Feb 2014 19:34:04 -0000	1.158
+++ fsio.c	11 Feb 2014 15:17:54 -0000	1.159
@@ -3262,11 +3262,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