Skip to content

Commit

Permalink
🛠 Sentry patch
Browse files Browse the repository at this point in the history
  • Loading branch information
RomaricMourgues authored Nov 19, 2020
1 parent d82e892 commit d8f90ba
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public function autoGenPreview($file_id)
public function checkLocalFileForPreview($file)
{
$tmppath = null;
$version = $this->doctrine->getRepository("Twake\Drive:DriveFileVersion")->findOneBy(Array("id" => $file->getLastVersionId()));
if (isset($version->getData()["identifier"]) && isset($version->getData()["upload_mode"]) && $version->getData()["upload_mode"] == "chunk") {
$uploadstate = $this->doctrine->getRepository("Twake\Drive:UploadState")->findOneBy(Array("identifier" => $version->getData()["identifier"]));
$version = $this->em->getRepository("Twake\Drive:DriveFileVersion")->findOneBy(Array("id" => $file->getLastVersionId()));
if ($version && isset($version->getData()["identifier"]) && isset($version->getData()["upload_mode"]) && $version->getData()["upload_mode"] == "chunk") {
$uploadstate = $this->em->getRepository("Twake\Drive:UploadState")->findOneBy(Array("identifier" => $version->getData()["identifier"]));
if ($uploadstate && $uploadstate->getHasPreview()) {
$tmppath = $this->drive_previews_tmp_folder . "/preview_" . $uploadstate->getIdentifier() . ".chunk_1";
}
Expand Down

0 comments on commit d8f90ba

Please sign in to comment.