From: Xiangfu Signed-off-by: Xiangfu Index: rtems/cpukit/ftpd/ftpd.c =================================================================== --- rtems.orig/cpukit/ftpd/ftpd.c 2012-01-03 10:16:17.000000000 -0300 +++ rtems/cpukit/ftpd/ftpd.c 2012-01-03 10:17:10.000000000 -0300 @@ -2068,6 +2068,14 @@ ftpd_access = rtems_ftpd_configuration.access; + if ( + rtems_ftpd_configuration.root && + rtems_ftpd_configuration.root[0] == '/' + ) + ftpd_root = rtems_ftpd_configuration.root; + + rtems_ftpd_configuration.root = ftpd_root; + if (rtems_ftpd_configuration.tasks_count <= 0) rtems_ftpd_configuration.tasks_count = 1; count = rtems_ftpd_configuration.tasks_count; @@ -2100,15 +2108,6 @@ return RTEMS_UNSATISFIED; } - ftpd_root = "/"; - if ( - rtems_ftpd_configuration.root && - rtems_ftpd_configuration.root[0] == '/' - ) - ftpd_root = rtems_ftpd_configuration.root; - - rtems_ftpd_configuration.root = ftpd_root; - syslog(LOG_INFO, "ftpd: FTP daemon started (%d session%s max)", count, ((count > 1) ? "s" : ""));