Author: dteske
Date: Sat Jun 22 03:44:49 2013
New Revision: 252084
URL: http://svnweb.freebsd.org/changeset/base/252084

Log:
  Trim the trailing `/' from the ftp_dir when validating that the directory
  exists on the FTP server. This now means that when you specify a full-path
  to the repository on the FTP server that it doesn't matter whether you have
  a trailing `/' or not.

Modified:
  head/usr.sbin/bsdconfig/share/media/ftp.subr

Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/media/ftp.subr        Sat Jun 22 02:57:52 
2013        (r252083)
+++ head/usr.sbin/bsdconfig/share/media/ftp.subr        Sat Jun 22 03:44:49 
2013        (r252084)
@@ -659,7 +659,10 @@ f_media_init_ftp()
                                break # to failure
                        fi
                        if echo "$rx" | awk -v dir="/${ftp_dir#/}" '
-                               BEGIN { found = 0 }
+                               BEGIN {
+                                       found = 0
+                                       sub("/$", "", dir)
+                               }
                                /^Remote directory: / {
                                        sub(/^[^:]*:[[:space:]]*/, "")
                                        if ($0 != dir) next
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to