diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-02-03 13:44:03 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-02-04 11:17:33 +0000 |
| commit | 7def76c7d817a9ec81e9ae4a03a850514b1a2e1c (patch) | |
| tree | 3fcf7e8236356daac44f7c17b8c0c5bc736a0926 /vendor/league | |
| parent | adfb3656b8dac8505590490f4f8aaf4bea27881b (diff) | |
| download | webtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.tar.gz webtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.tar.bz2 webtrees-7def76c7d817a9ec81e9ae4a03a850514b1a2e1c.zip | |
Working on upgrade wizard and testing
Diffstat (limited to 'vendor/league')
| -rw-r--r-- | vendor/league/flysystem/LICENSE | 2 | ||||
| -rw-r--r-- | vendor/league/flysystem/src/Adapter/Ftp.php | 4 | ||||
| -rw-r--r-- | vendor/league/flysystem/src/Adapter/Local.php | 1 | ||||
| -rw-r--r-- | vendor/league/flysystem/src/Filesystem.php | 3 | ||||
| -rw-r--r-- | vendor/league/flysystem/src/Util/ContentListingFormatter.php | 28 |
5 files changed, 22 insertions, 16 deletions
diff --git a/vendor/league/flysystem/LICENSE b/vendor/league/flysystem/LICENSE index 0d16ccc974..f2684c8417 100644 --- a/vendor/league/flysystem/LICENSE +++ b/vendor/league/flysystem/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2018 Frank de Jonge +Copyright (c) 2013-2019 Frank de Jonge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/league/flysystem/src/Adapter/Ftp.php b/vendor/league/flysystem/src/Adapter/Ftp.php index fd0660d2b4..a3ebaa75fd 100644 --- a/vendor/league/flysystem/src/Adapter/Ftp.php +++ b/vendor/league/flysystem/src/Adapter/Ftp.php @@ -380,13 +380,11 @@ class Ftp extends AbstractFtpAdapter */ public function getMetadata($path) { - $connection = $this->getConnection(); - if ($path === '') { return ['type' => 'dir', 'path' => '']; } - if (@ftp_chdir($connection, $path) === true) { + if (@ftp_chdir($this->getConnection(), $path) === true) { $this->setConnectionRoot(); return ['type' => 'dir', 'path' => $path]; diff --git a/vendor/league/flysystem/src/Adapter/Local.php b/vendor/league/flysystem/src/Adapter/Local.php index 1bdf51d81f..eea8cb6e70 100644 --- a/vendor/league/flysystem/src/Adapter/Local.php +++ b/vendor/league/flysystem/src/Adapter/Local.php @@ -106,6 +106,7 @@ class Local extends AbstractAdapter } umask($umask); + clearstatcache(false, $root); if ( ! is_dir($root)) { $errorMessage = isset($mkdirError['message']) ? $mkdirError['message'] : ''; diff --git a/vendor/league/flysystem/src/Filesystem.php b/vendor/league/flysystem/src/Filesystem.php index 7e9881fb54..8b0f9bdadc 100644 --- a/vendor/league/flysystem/src/Filesystem.php +++ b/vendor/league/flysystem/src/Filesystem.php @@ -270,7 +270,8 @@ class Filesystem implements FilesystemInterface $directory = Util::normalizePath($directory); $contents = $this->getAdapter()->listContents($directory, $recursive); - return (new ContentListingFormatter($directory, $recursive))->formatListing($contents); + return (new ContentListingFormatter($directory, $recursive, $this->config->get('case_sensitive', true))) + ->formatListing($contents); } /** diff --git a/vendor/league/flysystem/src/Util/ContentListingFormatter.php b/vendor/league/flysystem/src/Util/ContentListingFormatter.php index 5a8c95a8d9..ae0d3b91d2 100644 --- a/vendor/league/flysystem/src/Util/ContentListingFormatter.php +++ b/vendor/league/flysystem/src/Util/ContentListingFormatter.php @@ -13,19 +13,26 @@ class ContentListingFormatter * @var string */ private $directory; + /** * @var bool */ private $recursive; /** + * @var bool + */ + private $caseSensitive; + + /** * @param string $directory * @param bool $recursive */ - public function __construct($directory, $recursive) + public function __construct($directory, $recursive, $caseSensitive = true) { - $this->directory = $directory; + $this->directory = rtrim($directory, '/'); $this->recursive = $recursive; + $this->caseSensitive = $caseSensitive; } /** @@ -37,14 +44,9 @@ class ContentListingFormatter */ public function formatListing(array $listing) { - $listing = array_values( - array_map( - [$this, 'addPathInfo'], - array_filter($listing, [$this, 'isEntryOutOfScope']) - ) - ); + $listing = array_filter(array_map([$this, 'addPathInfo'], $listing), [$this, 'isEntryOutOfScope']); - return $this->sortListing($listing); + return $this->sortListing(array_values($listing)); } private function addPathInfo(array $entry) @@ -85,7 +87,9 @@ class ContentListingFormatter return true; } - return strpos($entry['path'], $this->directory . '/') === 0; + return $this->caseSensitive + ? strpos($entry['path'], $this->directory . '/') === 0 + : stripos($entry['path'], $this->directory . '/') === 0; } /** @@ -97,7 +101,9 @@ class ContentListingFormatter */ private function isDirectChild(array $entry) { - return Util::dirname($entry['path']) === $this->directory; + return $this->caseSensitive + ? $entry['dirname'] === $this->directory + : strcasecmp($this->directory, $entry['dirname']) === 0; } /** |
