Cmake test build (perl): Use File::Spec->rel2abs instead of abs_path()

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.
This commit is contained in:
Kornel Benko 2013-11-18 12:25:18 +01:00
parent fc00c117fc
commit 5f7102d2bc

View 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 = ();