diff --git a/CHANGELOG.md b/CHANGELOG.md index ea32e2aeb..2f05f1915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Added `language_codes` to Twig init to allow for easy language name/code/native-name lookup 1. [](#bugfix) * Simplified modular/twig processing logic and fixed an issue with system process config [#1351](https://github.com/getgrav/grav/issues/1351) + * Cleanup package files via GPM install to make them more windows-friendly [#1361](https://github.com/getgrav/grav/pull/1361) * Fix for page-level debugger override changing the option site-wide # v1.2.0-rc.2 diff --git a/system/src/Grav/Console/Gpm/InstallCommand.php b/system/src/Grav/Console/Gpm/InstallCommand.php index abf5e8163..70a113515 100644 --- a/system/src/Grav/Console/Gpm/InstallCommand.php +++ b/system/src/Grav/Console/Gpm/InstallCommand.php @@ -563,6 +563,7 @@ class InstallCommand extends ConsoleCommand $tmp_dir = Grav::instance()['locator']->findResource('tmp://', true, true); $this->tmp = $tmp_dir . '/Grav-' . uniqid(); $filename = $package->slug . basename($package->zipball_url); + $filename = preg_replace('/[\\\\\/:"*?&<>|]+/mi', '-', $filename); $query = ''; if ($package->premium) {