Skip to content

Commit a5ceff6

Browse files
committed
Handle absolute paths to integrite files
1 parent a94ef20 commit a5ceff6

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

modules/GHSWorkspaceCreator.pm

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ sub pre_workspace {
6464
if (defined $$prjs[0]) {
6565
my $fh = new FileHandle();
6666
my $outdir = $self->get_outdir();
67-
#my $fullpath = $$prjs[0];
68-
#$fullpath = "$outdir/$fullpath" unless ($fullpath =~ /^\/.+/ || $fullpath =~ /^[a-zA-Z]:.+/);
6967
my $fullpath = is_absolute_path($$prjs[0]) ? $$prjs[0] : "$outdir/$$prjs[0]";
7068

7169
if (open($fh, $fullpath)) {
@@ -142,7 +140,8 @@ sub create_integrity_project {
142140
my $int_file = $int_proj;
143141
$int_file =~ s/\.gpj$/.int/;
144142

145-
if (open($fh, ">$outdir/$int_proj")) {
143+
my $int_proj_path = is_absolute_path($int_proj) ? $int_proj : "$outdir/$int_proj";
144+
if (open($fh, ">$int_proj_path")) {
146145
## First print out the project file
147146
print $fh "#!gbuild$crlf",
148147
"\t$integrity$crlf",
@@ -154,7 +153,8 @@ sub create_integrity_project {
154153
close($fh);
155154

156155
## Next create the integration file
157-
if (open($fh, ">$outdir/$int_file")) {
156+
my $int_path = is_absolute_path($int_file) ? $int_file : "$outdir/$int_file";
157+
if (open($fh, ">$int_path")) {
158158
print $fh "Kernel$crlf",
159159
"\tFilename\t\t\tDynamicDownload$crlf",
160160
"EndKernel$crlf$crlf",
@@ -183,12 +183,6 @@ sub mix_settings {
183183
# If the project file path is already an absolute path, use it.
184184
my $fullpath = is_absolute_path($project) ? $project : "$outdir/$project";
185185

186-
#if ($project =~ /^\/.+/ || $project =~ /^[a-zA-Z]:.+/) {
187-
# $fullpath = $project;
188-
#} else {
189-
# $fullpath = "$outdir/$project";
190-
#}
191-
192186
## Things that seem like they should be set in the project
193187
## actually have to be set in the controlling project file.
194188
if (open($rh, $fullpath)) {

0 commit comments

Comments
 (0)