@@ -363,7 +363,7 @@ int main(int argc, char** argv) {
363
363
std::string ifsdata_source = getTag (slot_path + std::string (" /" ) + ifsdata_file + std::string (" .zip" ));
364
364
365
365
// Copy the ifsdata_file to the working directory
366
- std::string ifsdata_destination = slot_path + std::string (" /ifsdata /" ) + ifsdata_file + std::string (" .zip" );
366
+ std::string ifsdata_destination = ifsdata_folder + std::string (" /" ) + ifsdata_file + std::string (" .zip" );
367
367
fprintf (stderr," Copying the ifsdata_file from: %s to: %s\n " ,ifsdata_source.c_str (),ifsdata_destination.c_str ());
368
368
retval = boinc_copy (ifsdata_source.c_str (),ifsdata_destination.c_str ());
369
369
if (retval) {
@@ -372,9 +372,9 @@ int main(int argc, char** argv) {
372
372
}
373
373
374
374
// Unzip the ifsdata_file zip file
375
- std::string ifsdata_zip = slot_path + std::string (" /ifsdata /" ) + ifsdata_file + std::string (" .zip" );
376
- fprintf (stderr," Unzipping ifsdata_zip file: %s\n " , ifsdata_zip.c_str ());
377
- retval = boinc_zip (UNZIP_IT,ifsdata_zip.c_str (),slot_path+ std::string (" /ifsdata /" ));
375
+ std::string ifsdata_zip = ifsdata_folder + std::string (" /" ) + ifsdata_file + std::string (" .zip" );
376
+ fprintf (stderr," Unzipping the ifsdata_zip file: %s\n " , ifsdata_zip.c_str ());
377
+ retval = boinc_zip (UNZIP_IT,ifsdata_zip.c_str (),ifsdata_folder + std::string (" /" ));
378
378
if (retval) {
379
379
fprintf (stderr," ..Unzipping the ifsdata_zip file failed\n " );
380
380
return retval;
@@ -385,7 +385,7 @@ int main(int argc, char** argv) {
385
385
}
386
386
387
387
388
- // Process the CLIMATE_DATA_FILE :
388
+ // Process the climate_data_file :
389
389
// Make the climate data directory
390
390
std::string climate_data_path = slot_path + std::string (" /" ) + horiz_resolution + grid_type;
391
391
if (mkdir (climate_data_path.c_str (),S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) != 0 ) \
@@ -395,9 +395,7 @@ int main(int argc, char** argv) {
395
395
std::string climate_data_source = getTag (slot_path + std::string (" /" ) + climate_data_file + std::string (" .zip" ));
396
396
397
397
// Copy the climate data file to working directory
398
- std::string climate_data_destination = slot_path + std::string (" /" ) + \
399
- horiz_resolution + grid_type + \
400
- std::string (" /" ) + climate_data_file + std::string (" .zip" );
398
+ std::string climate_data_destination = climate_data_path + std::string (" /" ) + climate_data_file + std::string (" .zip" );
401
399
fprintf (stderr," Copying the climate data file from: %s to: %s\n " ,climate_data_source.c_str (),climate_data_destination.c_str ());
402
400
retval = boinc_copy (climate_data_source.c_str (),climate_data_destination.c_str ());
403
401
if (retval) {
@@ -406,12 +404,9 @@ int main(int argc, char** argv) {
406
404
}
407
405
408
406
// Unzip the climate data zip file
409
- std::string climate_zip = slot_path + std::string (" /" ) + \
410
- horiz_resolution + grid_type + \
411
- std::string (" /" ) + climate_data_file + std::string (" .zip" );
407
+ std::string climate_zip = climate_data_destination;
412
408
fprintf (stderr," Unzipping the climate data zip file: %s\n " ,climate_zip.c_str ());
413
- retval = boinc_zip (UNZIP_IT,climate_zip.c_str (),\
414
- slot_path+std::string (" /" )+horiz_resolution+grid_type);
409
+ retval = boinc_zip (UNZIP_IT,climate_zip.c_str (),climate_data_path);
415
410
if (retval) {
416
411
fprintf (stderr," ..Unzipping the climate data file failed\n " );
417
412
return retval;
0 commit comments