mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-26 15:25:18 +02:00
Additional zip fixes for Windows
This commit is contained in:
@@ -94,7 +94,9 @@ class ZipHandler
|
||||
*/
|
||||
protected function stripPath(SplFileInfo $file, string $path): string
|
||||
{
|
||||
$pattern = sprintf('/^%s\/?/', preg_quote($path, '/'));
|
||||
$pattern = sprintf(
|
||||
'/^%s%s?/', preg_quote($path, '/'), preg_quote(DIRECTORY_SEPARATOR, '/')
|
||||
);
|
||||
|
||||
return preg_replace($pattern, '', $file->getPathname());
|
||||
}
|
||||
|
Reference in New Issue
Block a user