Skip to content

Commit

Permalink
Minor fix to work with flysystem 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasvielmetter committed Feb 1, 2024
1 parent 46da262 commit 7b6dcd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"description": "docx template manipulation class, based on mustache templating language",
"keywords": ["laravel", "docx", "openxml", "template", "mustache", "php"],
"require": {
"php" : ">=7.1.0",
"php" : ">=7.4.0",
"mustache/mustache": "^2.12",
"intervention/image": "^2.5",
"intervention/image": "^2.7",
"wrklst/zipper": "^1.0"
},
"homepage" : "https://github.com/wrklst/docxmustache",
Expand Down
4 changes: 2 additions & 2 deletions src/WrkLst/DocxMustache/DocxMustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function StoragePath($file)
if ($this->useStoragePath) {
return \Storage::disk($this->storageDisk)->path($file);
}
$pathPrefix = \Storage::disk($this->storageDisk)->getDriver()->getAdapter()->getPathPrefix();
$pathPrefix = \Storage::disk($this->storageDisk)->path('');
return $pathPrefix.$file;
}

Expand Down Expand Up @@ -142,7 +142,7 @@ public function CopyTmplate()

protected function exctractOpenXmlFile($file)
{
$pathPrefix = \Storage::disk($this->storageDisk)->getDriver()->getAdapter()->getPathPrefix();
$pathPrefix = \Storage::disk($this->storageDisk)->path('');
$this->zipper
->make($pathPrefix.$this->local_path.$this->template_file_name)
->extractTo($pathPrefix.$this->local_path, [$file], \Wrklst\Zipper\Zipper::WHITELIST);
Expand Down

0 comments on commit 7b6dcd9

Please sign in to comment.