Fixed bug to change working directory when changing the path by typing or loading configuration file (issue MUSR-316).
This commit is contained in:
@ -472,6 +472,17 @@ void TrimSPGUI::StartSequenceOne()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Create a subdirectory where all input/output files are saved
|
||||||
|
if (-d $All{"Path"}) {
|
||||||
|
# Directory exists, do nothing
|
||||||
|
} else {
|
||||||
|
$cmd="mkdir ".$All{"Path"};
|
||||||
|
system($cmd);
|
||||||
|
}
|
||||||
|
# Change work directory accordingly
|
||||||
|
chdir ($All{"Path"});
|
||||||
|
|
||||||
|
|
||||||
# Cleanup from old files
|
# Cleanup from old files
|
||||||
if (-e "ausgabe1.inp") {
|
if (-e "ausgabe1.inp") {
|
||||||
system("rm -f ausgabe*");
|
system("rm -f ausgabe*");
|
||||||
|
@ -493,7 +493,7 @@ sub StartSequenceOne
|
|||||||
my $cmd="";
|
my $cmd="";
|
||||||
|
|
||||||
my @called = caller;
|
my @called = caller;
|
||||||
print "pck=".$called[0]." fln=".$called[1]." line=".$called[2];
|
# print "pck=".$called[0]." fln=".$called[1]." line=".$called[2];
|
||||||
if (!$ENV{'TRIMBIN'}) {
|
if (!$ENV{'TRIMBIN'}) {
|
||||||
# If trim.sp binary is not defined give warning and return
|
# If trim.sp binary is not defined give warning and return
|
||||||
my $Warning = Qt::MessageBox::information( this, "Warning!",
|
my $Warning = Qt::MessageBox::information( this, "Warning!",
|
||||||
@ -502,6 +502,15 @@ sub StartSequenceOne
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Create a subdirectory where all input/output files are saved
|
||||||
|
if (-d $All{"workPath"}) {
|
||||||
|
# Directory exists, do nothing
|
||||||
|
} else {
|
||||||
|
$cmd="mkdir ".$All{"workPath"};
|
||||||
|
system($cmd);
|
||||||
|
}
|
||||||
|
# Change work directory accordingly
|
||||||
|
chdir ($All{"workPath"});
|
||||||
|
|
||||||
# Cleanup from old files
|
# Cleanup from old files
|
||||||
if (-e "ausgabe1.inp") {
|
if (-e "ausgabe1.inp") {
|
||||||
@ -612,7 +621,7 @@ sub StartSequenceOne
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Move the fort.33 file into the subdirectory and change its name
|
# Move the fort.33 file into the subdirectory and change its name
|
||||||
$cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"workPath"}."/".$All{"fileNamePrefix"}."_Seq_Results.dat";
|
$cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"fileNamePrefix"}."_Seq_Results.dat";
|
||||||
system($cmd);
|
system($cmd);
|
||||||
$Progress=100;
|
$Progress=100;
|
||||||
this->{ui}->progress->setValue($Progress);
|
this->{ui}->progress->setValue($Progress);
|
||||||
|
Reference in New Issue
Block a user