Make WordPress Core

Changeset 9862


Ignore:
Timestamp:
11/24/2008 08:24:07 PM (18 years ago)
Author:
ryan
Message:

Fix SSH2 fs exists() method. Props ydekproductions. fixes #8331

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-ssh2.php

    r8880 r9862  
    162162                        }
    163163                        fclose($stream);
    164                         $data = str_replace("__COMMAND_FINISHED__", "", $data);
     164                        $data = trim(str_replace("__COMMAND_FINISHED__", "", $data));
    165165                        if (($returnbool) && ( (int) $data )) {
    166166                                return true;
    … …  
    312312        function exists($file) {
    313313                $this->debug("exists();");
    314                 $list = $this->run_command($this->link, sprintf('ls -lad %s', $file));
    315                 return (bool) $list;
     314                return $this->run_command($this->link, sprintf('ls -lad %s', $file), true);
    316315        }
    317316
Note: See TracChangeset for help on using the changeset viewer.