mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Fix SSH2 fs exists() method. Props ydekproductions. fixes #8331
git-svn-id: https://develop.svn.wordpress.org/trunk@9862 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cffae5aabf
commit
ce322c83c7
@ -161,7 +161,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
$data .= $buf;
|
||||
}
|
||||
fclose($stream);
|
||||
$data = str_replace("__COMMAND_FINISHED__", "", $data);
|
||||
$data = trim(str_replace("__COMMAND_FINISHED__", "", $data));
|
||||
if (($returnbool) && ( (int) $data )) {
|
||||
return true;
|
||||
} elseif (($returnbool) && (! (int) $data )) {
|
||||
@ -311,8 +311,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
|
||||
function exists($file) {
|
||||
$this->debug("exists();");
|
||||
$list = $this->run_command($this->link, sprintf('ls -lad %s', $file));
|
||||
return (bool) $list;
|
||||
return $this->run_command($this->link, sprintf('ls -lad %s', $file), true);
|
||||
}
|
||||
|
||||
function is_file($file) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user