Fix XLSX Writer on Windows plaftorms

A bug was introduced, preventing Spout to create valid XLSX files on Windows.
This commits reverts the changes that introduced DIRECTORY_SEPARATOR everywhere
and fixes the original issue with the writer by normalizing paths when creating
the zipped file.
This commit is contained in:
Adrien Loison committed 2015-07-01 15:24:58 -07:00
1 parent c6ebf115fc
commit b3df57d2e5
9 files changed
+29 -38

No files matched your search

+2 -2
View File
@@ -36,7 +36,7 @@ class FileSystemHelper
{
$this->throwIfOperationNotInBaseFolder($parentFolderPath);
$folderPath = $parentFolderPath . DIRECTORY_SEPARATOR . $folderName;
$folderPath = $parentFolderPath . '/' . $folderName;
$wasCreationSuccessful = mkdir($folderPath, 0777, true);
if (!$wasCreationSuccessful) {
@@ -60,7 +60,7 @@ class FileSystemHelper
{
$this->throwIfOperationNotInBaseFolder($parentFolderPath);
$filePath = $parentFolderPath . DIRECTORY_SEPARATOR . $fileName;
$filePath = $parentFolderPath . '/' . $fileName;
$wasCreationSuccessful = file_put_contents($filePath, $fileContents);
if (!$wasCreationSuccessful) {