[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.16-5-gc7d1c70fbb

? sunnavy sunnavy at bestpractical.com
Wed Nov 4 10:04:34 EST 2020


The branch, 4.2-trunk has been updated
       via  c7d1c70fbbe820eea26bf36716a47c9069e6ff26 (commit)
      from  cc03b490af32328d1d3d7e805383ace89420f456 (commit)

Summary of changes:
 lib/RT/Handle.pm | 4 ++++
 1 file changed, 4 insertions(+)

- Log -----------------------------------------------------------------
commit c7d1c70fbbe820eea26bf36716a47c9069e6ff26
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Nov 30 11:44:17 2018 -0500

    Find full path for processing index files on upgrade
    
    Starting with perl 5.26, . (the current directory) is no
    longer in @INC by default, which causes upgrade steps that insert
    indexes to fail when RT::Handle tries to require the file.
    Set the full path so the indexes file can be found.

diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 379523a84a..10b81f4fe5 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -72,6 +72,7 @@ use strict;
 use warnings;
 
 use File::Spec;
+use Cwd;
 
 =head1 METHODS
 
@@ -587,6 +588,9 @@ sub InsertIndexes {
         }
     }
 
+    # Get the full path since . is no longer in @INC after perl 5.24
+    $path = Cwd::abs_path($path);
+
     local $@;
     eval { require $path; 1 }
         or return (0, "Couldn't execute '$path': " . $@);

-----------------------------------------------------------------------


More information about the rt-commit mailing list