From 9cdfe4bb00ad3936eb5c885fc6a4258d27dc5325 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 11 Apr 2025 17:09:39 +0200 Subject: [PATCH] wip #7423 @1 --- src/Links/ZoomLink.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Links/ZoomLink.php b/src/Links/ZoomLink.php index 5dbcd28..6053158 100644 --- a/src/Links/ZoomLink.php +++ b/src/Links/ZoomLink.php @@ -244,7 +244,16 @@ class ZoomLink extends NormalLink $compiler->addIssue(16, ['error' => 'File empty', 'uid' => $attributes['id'], 'page' => $attributes['page']]); return null; } - $dest = 'data/links/' . $save . '_' . $attributes['id'] . '.' . $ext; + $f = $save . '_' . $attributes['id'] . '.' . $ext; + $dest = 'data/links/' . $f; + if (isset($compiler->book_id)) { + $d = Files::mkdir($cache . '/books/' . $compiler->book_id . '/data/links'); + $link = $d . $f; + if (is_link($link)) { + unlink($link); + } + symlink($both, $link); + } if ($copy) { $compiler->simpleCopyLinkFile($both, $dest); } -- 2.39.5