]> git.lyx.org Git - features.git/commitdiff
Cmake test build (perl): Use File::Spec->rel2abs instead of abs_path()
authorKornel Benko <kornel@lyx.org>
Mon, 18 Nov 2013 11:25:18 +0000 (12:25 +0100)
committerKornel Benko <kornel@lyx.org>
Mon, 18 Nov 2013 11:25:18 +0000 (12:25 +0100)
Problem arises on fresh build, where the destination file is not yet defined.
In that case Cwd::abs_path() returns empty string, which fatal later on.

development/autotests/useSystemFonts.pl

index c26f758e1ea4245cf83294f66acb040af4f9d1e3..c5a59c70d51bf67f84025ce65bc20e6f66aa7980 100644 (file)
@@ -43,7 +43,6 @@ BEGIN {
 }
 use File::Basename;
 use File::Path;
-use Cwd 'abs_path';
 use File::Copy "cp";
 use File::Temp qw/ :POSIX /;
 use lyxStatus;
@@ -57,8 +56,8 @@ my ($source, $dest, $format, $rest) = @ARGV;
 &diestack("Destfilename not defined") if (! defined($dest));
 &diestack("Format (e.g. pdf4) not defined") if (! defined($format));
 
-$source = &abs_path($source);
-$dest = &abs_path($dest);
+$source = File::Spec->rel2abs($source);
+$dest = File::Spec->rel2abs($dest);
 
 my %font = ();