fixed problem with full path-file-name.

This commit is contained in:
suter_a 2017-01-14 11:44:35 +01:00
parent ad082a8cb2
commit 30708ff4bc
3 changed files with 12 additions and 3 deletions

View File

@ -929,13 +929,20 @@ int main(int argc, char *argv[])
}
bool found_fln = false;
// 1st check if the file name is found in the current directory
string pathFln("");
pathFln = "./" + fileName;
// 1st check if the file name is the full path-file name and the file exists
pathFln = fileName;
if (dump_file_exists(pathFln))
found_fln = true;
// 2nd check if file name is found in any default search paths if not already found in the current directory
// 2nd check if the file name is found in the current directory
if (!found_fln) {
pathFln = "./" + fileName;
if (dump_file_exists(pathFln))
found_fln = true;
}
// 3rd check if file name is found in any default search paths if not already found in the current directory
if (!found_fln) {
PStringVector pathList = startupHandler->GetDataPathList();
for (unsigned int i=0; i<pathList.size(); i++) {

View File

@ -2388,6 +2388,7 @@ void PTextEdit::musrDump()
QVector<QString> cmd;
QString str = fAdmin->getExecPath() + "/dump_header";
cmd.append(str);
cmd.append("-fn");
cmd.append(fileName);
PDumpOutputHandler dumpOutputHandler(cmd);

View File

@ -2488,6 +2488,7 @@ void PTextEdit::musrDump()
QVector<QString> cmd;
QString str = fAdmin->getExecPath() + "/dump_header";
cmd.append(str);
cmd.append("-fn");
cmd.append(fileName);
PDumpOutputHandler dumpOutputHandler(cmd);