summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/bin/modules/installer/pathanalyzer.pm4
-rw-r--r--solenv/bin/modules/pre2par/pathanalyzer.pm5
2 files changed, 5 insertions, 4 deletions
diff --git a/solenv/bin/modules/installer/pathanalyzer.pm b/solenv/bin/modules/installer/pathanalyzer.pm
index 7f3f68a4edb2..312042acb1a0 100644
--- a/solenv/bin/modules/installer/pathanalyzer.pm
+++ b/solenv/bin/modules/installer/pathanalyzer.pm
@@ -47,7 +47,7 @@ sub make_absolute_filename_to_relative_filename
if ( $installer::globals::isunix )
{
- if ( $$longfilenameref =~ /^.*\/(\S.+\S?)/ )
+ if ( $$longfilenameref =~ /^.*\/(?=\S)([^\/]+)(?<=\S)/ )
{
$$longfilenameref = $1;
}
@@ -56,7 +56,7 @@ sub make_absolute_filename_to_relative_filename
if ( $installer::globals::iswin )
{
# Either '/' or '\'. It would be possible to use $installer::globals::separator.
- if ( $$longfilenameref =~ /^.*[\/\\](\S.+\S?)/ )
+ if ( $$longfilenameref =~ /^.*[\/\\](?=\S)([^\/\\]+)(?<=\S)/ )
{
$$longfilenameref = $1;
}
diff --git a/solenv/bin/modules/pre2par/pathanalyzer.pm b/solenv/bin/modules/pre2par/pathanalyzer.pm
index 0aefcd1b43c8..4d2eb31ae073 100644
--- a/solenv/bin/modules/pre2par/pathanalyzer.pm
+++ b/solenv/bin/modules/pre2par/pathanalyzer.pm
@@ -48,7 +48,7 @@ sub make_absolute_filename_to_relative_filename
if ( $pre2par::globals::isunix )
{
- if ( $$longfilenameref =~ /^.*\/(\S.+\S?)/ )
+ if ( $$longfilenameref =~ /^.*\/(?=\S)([^\/]+)(?<=\S)/ )
{
$$longfilenameref = $1;
}
@@ -56,7 +56,8 @@ sub make_absolute_filename_to_relative_filename
if ( $pre2par::globals::iswin )
{
- if ( $$longfilenameref =~ /^.*\\(\S.+\S?)/ )
+ # Either '/' or '\'.
+ if ( $$longfilenameref =~ /^.*[\/\\](?=\S)([^\/\\]+)(?<=\S)/ )
{
$$longfilenameref = $1;
}