Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/FileTransfer/FileTransfer.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php Thu May 09 15:33:08 2019 +0100 @@ -272,7 +272,7 @@ */ protected function copyDirectoryJailed($source, $destination) { if ($this->isDirectory($destination)) { - $destination = $destination . '/' . drupal_basename($source); + $destination = $destination . '/' . \Drupal::service('file_system')->basename($source); } $this->createDirectory($destination); foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $filename => $file) { @@ -364,7 +364,7 @@ $chroot = ''; while (count($parts)) { $check = implode($parts, '/'); - if ($this->isFile($check . '/' . drupal_basename(__FILE__))) { + if ($this->isFile($check . '/' . \Drupal::service('file_system')->basename(__FILE__))) { // Remove the trailing slash. return substr($chroot, 0, -1); }