diff --git a/packages/playground/blueprints/src/lib/steps/zip-wp-content.ts b/packages/playground/blueprints/src/lib/steps/zip-wp-content.ts index 01d8eec14b..b2fe27e28e 100644 --- a/packages/playground/blueprints/src/lib/steps/zip-wp-content.ts +++ b/packages/playground/blueprints/src/lib/steps/zip-wp-content.ts @@ -106,7 +106,8 @@ function zipDir($root, $output, $options = array()) $directory_path = $entry . '/'; array_push($directories, $directory_path); } else if (is_file($entry)) { - $zip->addFile($entry, substr($entry, strlen($zip_root))); + // ensure compliance with zip spec by only using relative paths for files + $zip->addFile($entry, ltrim(substr($entry, strlen($zip_root)), '/')); } } closedir($handle);