diff --git a/src/ParamOutputImpl/Download/DownloadOutput.cc b/src/ParamOutputImpl/Download/DownloadOutput.cc index 39e61aa..ff8db35 100644 --- a/src/ParamOutputImpl/Download/DownloadOutput.cc +++ b/src/ParamOutputImpl/Download/DownloadOutput.cc @@ -724,67 +724,64 @@ std::string DownloadOutput::getFilePath(std::string extension, bool infoFile) filePath << "/"; if (_downloadProperties.getFileName().empty()) - { filePath << "output-"; + else + filePath << _downloadProperties.getFileName() << "-"; - //add parameters ids - bool firstParam = true; - for (auto paramProperties : _downloadProperties.getParamPropertiesList()) + //add parameters ids + bool firstParam = true; + for (auto paramProperties : _downloadProperties.getParamPropertiesList()) + { + if (!_currentParamId.empty()) { - if (!_currentParamId.empty()) - { - //add only current parameter id - if (_currentParamId != paramProperties->getOutputId()) - continue; - } + //add only current parameter id + if (_currentParamId != paramProperties->getOutputId()) + continue; + } - if (!firstParam) - filePath << "_"; - firstParam = false; + if (!firstParam) + filePath << "_"; + firstParam = false; - filePath << paramProperties->getOriginalId(); + filePath << paramProperties->getOriginalId(); - //add indexes - for (auto index : paramProperties->getIndexDefList()) - { - boost::replace_all(index, "[", ""); - boost::replace_all(index, "]", ""); - boost::replace_all(index, "*", "x"); - filePath << "_" << index; - } + //add indexes + for (auto index : paramProperties->getIndexDefList()) + { + boost::replace_all(index, "[", ""); + boost::replace_all(index, "]", ""); + boost::replace_all(index, "*", "x"); + filePath << "_" << index; } + } - if (!infoFile) + if (!infoFile) + { + if ((_downloadProperties.getOutputStructure() != ONE_FILE) && + (_downloadProperties.getOutputStructure() != ONE_FILE_REFPARAM) && + (_parameterManager.getInputIntervals()->size() != 1)) + { + //add interval index + filePath << "_" << _currentIntervalIndex; + } + else { - if ((_downloadProperties.getOutputStructure() != ONE_FILE) && - (_downloadProperties.getOutputStructure() != ONE_FILE_REFPARAM) && - (_parameterManager.getInputIntervals()->size() != 1)) + if (_parameterManager.getTimeTablePath().empty()) { - //add interval index - filePath << "_" << _currentIntervalIndex; + //add start time + double lStartTime = _currentTimeInterval->_startTime; + char buffer[TIMELENGTH]; + Double2DD_Time(buffer, lStartTime); + filePath << "_" << buffer; } else { - if (_parameterManager.getTimeTablePath().empty()) - { - //add start time - double lStartTime = _currentTimeInterval->_startTime; - char buffer[TIMELENGTH]; - Double2DD_Time(buffer, lStartTime); - filePath << "_" << buffer; - } - else - { - //add TT name - filePath << "_" << getTTName(); - } + //add TT name + filePath << "_" << getTTName(); } } } else - filePath << _downloadProperties.getFileName(); - - if (infoFile) filePath << "_info"; //add extension diff --git a/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT3/UserStory8/content.txt b/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT3/UserStory8/content.txt index bbe007d..55d4058 100644 --- a/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT3/UserStory8/content.txt +++ b/test/FitNesseRoot/ReleaseS/SecondPart/ReLease1/SprinT3/UserStory8/content.txt @@ -37,7 +37,7 @@ |check|diffOutputFile|REF_output-velocity_2008000000000000.txt|file1|output-velocity_2008000000000000.txt|file2|0| |note|!- id 30 avec précision du nom du fichier résultat dans la requête -!| |check|execute|${executable}|command|${path}request_us8_30_with_filename.xml|args|0| -|check|execute|!-test `ls myresult.txt | wc -l` -!|command| -eq 1 |args|0| +|check|execute|!-test `ls myresult-imf_dst_2008000000000000.txt | wc -l` -!|command| -eq 1 |args|0| !|script|TestAmdaCommandLine| |set|${path}|path| @@ -47,6 +47,6 @@ |check|execute|!- rm -!|command| output-efield_dst_2008000000000000.txt |args|0| |check|execute|!- rm -!|command| output-imf_0_1_2008000000000000.txt |args|0| |check|execute|!- rm -!|command| output-imf_dst_2008000000000000.txt|args|0| -|check|execute|!- rm -!|command| myresult.txt|args|0| +|check|execute|!- rm -!|command| myresult-imf_dst_2008000000000000.txt|args|0| ----- !contents -R2 -g -p -f -h -- libgit2 0.21.2