Skip to content

Commit

Permalink
Merge pull request #8 from eusonlito/patch-1
Browse files Browse the repository at this point in the history
Fixed virtual_path not set on write without useDisplayPaths
  • Loading branch information
masbug authored Dec 14, 2020
2 parents e922737 + 4883a50 commit 041b20c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/GoogleDriveAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ public function __construct(Google_Service_Drive $service, $root = null, $option
public function write($path, $contents, Config $config)
{
$updating = null;

if($this->useDisplayPaths) {
try {
$virtual_path = $this->toVirtualPath($path, true, false);
Expand Down Expand Up @@ -268,7 +269,10 @@ function ($p) {
}
$virtual_path = $virtual_path[0];
}
} else {
$virtual_path = $path;
}

return $this->upload($virtual_path, $contents, $config, $updating);
}

Expand Down

0 comments on commit 041b20c

Please sign in to comment.