Support » Requests and Feedback » Patch to fix filesystem/ftpext class on FreeBSD ftp daemon

  • I posted this here, but it struck me that it might not be the right place to get it implemented in WP core, so I’m posting it here too.

    exists() in the filesystem/ftpext class seems broken for me, and the following patch fixes it for me – but I don’t know enough PHP to know whether it’s suitable for everyone.

    I would truly appreciate if this patch could make it into the next release, because the moment I’m manually patching it into a bunch WordPress installations so that users can update plugins without it deleting the files and giving up.

    --- wp-admin/includes/class-wp-filesystem-ftpext.php 2009-08-04 20:55:35.000000000 +0000
    +++ wp-admin/includes/class-wp-filesystem-ftpext.php 2009-08-04 21:11:16.000000000 +0000
    @@ -201,7 +201,7 @@
            function exists($file) {
    -               $list = @ftp_rawlist($this->link, $file, false);
    +               $list = @ftp_nlist($this->link, $file);
                    return !empty($list); //empty list = no file, so invert.
            function is_file($file) {

    Full “technical” babble can be found here:

Viewing 3 replies - 1 through 3 (of 3 total)
  • fwaggle


    Has anyone looked at this? This is seriously becoming a huge thorn in my side, every minor update breaks plugin upgrading again and the patch looks so trivial. If someone could at least explain why it’s a dumb idea, that’d be great.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Sorry we never noticed this, but core patches and such should be posted over on in order for them to get any attention.

    Your normal login name will work. If you can’t find an open ticket describing this issue in a search there, create a new one.



    Ahh thanks, and in fact it looks like someone else already posted it, others arrived at the same conclusion I did and it’s had some testing. Looks as though it’ll make it to 2.9. Thanks for pointing me in the right direction I was starting to worry. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Patch to fix filesystem/ftpext class on FreeBSD ftp daemon’ is closed to new replies.