Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions fixpermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,20 @@

// find out full names of the executables
foreach ($executables as $relname) {
$realpath = realpath("$sourcedir/$relname");
if ($realpath !== false) {
$executables[$realpath] = $relname;
} else {
echo "Can not find real path for $relname in git repository\n";
exit(1);
$realpath = realpath("$sourcedir/public/$relname");

// If the path doesn't exist, it may be a legacy branch that doesn't use the 'public/' prefix.
// This fallback will be necessary until 4.5 (LTS) falls out of security support (6 Oct 2027).
if ($realpath === false) {
$realpath = realpath("$sourcedir/$relname");
}
if (!file_exists($realpath)) {
echo "Can not find executable file $realpath in git repository\n";

if ($realpath === false) {
echo "Can not find real path for $relname in git repository\n";
exit(1);
}

$executables[$realpath] = $relname;
}

// These files may not exist in all the branches, so we are adding them now, after
Expand Down