aboutsummaryrefslogtreecommitdiff
path: root/p/ext.php
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-05-02 09:47:57 +0200
committerGravatar GitHub <noreply@github.com> 2025-05-02 09:47:57 +0200
commit4568111c00813756a3a34a381d684b8354fc4438 (patch)
treeb91fb3b71611f83378268d5a46e2b2ec43029a7f /p/ext.php
parentdf6e57c289c472edda773cb1733040ab62395dbf (diff)
Fix file serving for symlinked extensions (#7545)
* Fix file serving for symlinked extensions from ext.php * Don't resolve symlink when deleting extension * Minor syntax --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/ext.php')
-rw-r--r--p/ext.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/p/ext.php b/p/ext.php
index 98684e45e..f470b7210 100644
--- a/p/ext.php
+++ b/p/ext.php
@@ -11,6 +11,11 @@ function get_absolute_filename(string $file_name): string {
$third_party_extension = realpath(THIRDPARTY_EXTENSIONS_PATH . '/' . $file_name);
if (false !== $third_party_extension) {
+ $original_dir = THIRDPARTY_EXTENSIONS_PATH . '/' . explode('/', $file_name)[0];
+ if (is_link($original_dir)) {
+ return THIRDPARTY_EXTENSIONS_PATH . '/' . $file_name;
+ }
+
return $third_party_extension;
}