diff options
Diffstat (limited to 'config/systempatches/patches.inc')
-rw-r--r-- | config/systempatches/patches.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/systempatches/patches.inc b/config/systempatches/patches.inc index 0aa37fb8..2298e170 100644 --- a/config/systempatches/patches.inc +++ b/config/systempatches/patches.inc @@ -94,6 +94,12 @@ function patch_fetch(& $patch) { return false; } else { $patch['patch'] = base64_encode($text); + // Detect pfSense move from / to /src and fix pathstrip + if (is_github_url($patch['location']) && + $patch['pathstrip'] == 1 && + preg_match('/\n--- a\/src\//', $text)) { + $patch['pathstrip'] = 2; + } write_config("Fetched patch {$patch['descr']}"); return true; } |