Solving issue #3948
This commit is contained in:
parent
01ffd294b2
commit
ded8c66fcd
@ -294,6 +294,7 @@ int processLineParams( int argc, char **argv )
|
|||||||
Glib::ustring outputPath = "";
|
Glib::ustring outputPath = "";
|
||||||
std::vector<rtengine::procparams::PartialProfile*> processingParams;
|
std::vector<rtengine::procparams::PartialProfile*> processingParams;
|
||||||
bool outputDirectory = false;
|
bool outputDirectory = false;
|
||||||
|
bool leaveUntouched = false;
|
||||||
bool overwriteFiles = false;
|
bool overwriteFiles = false;
|
||||||
bool sideProcParams = false;
|
bool sideProcParams = false;
|
||||||
bool copyParamsFile = false;
|
bool copyParamsFile = false;
|
||||||
@ -324,7 +325,11 @@ int processLineParams( int argc, char **argv )
|
|||||||
#if ECLIPSE_ARGS
|
#if ECLIPSE_ARGS
|
||||||
outputPath = outputPath.substr(1, outputPath.length()-2);
|
outputPath = outputPath.substr(1, outputPath.length()-2);
|
||||||
#endif
|
#endif
|
||||||
if( Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) {
|
if(outputPath.substr(0,9) == "/dev/null") {
|
||||||
|
outputPath.assign("/dev/null"); // removing any useless chars or filename
|
||||||
|
outputDirectory = false;
|
||||||
|
leaveUntouched = true;
|
||||||
|
} else if(Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) {
|
||||||
outputDirectory = true;
|
outputDirectory = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -696,9 +701,13 @@ int processLineParams( int argc, char **argv )
|
|||||||
Glib::ustring::size_type ext = s.find_last_of('.');
|
Glib::ustring::size_type ext = s.find_last_of('.');
|
||||||
outputFile = Glib::build_filename(outputPath, s.substr(0, ext) + "." + outputType);
|
outputFile = Glib::build_filename(outputPath, s.substr(0, ext) + "." + outputType);
|
||||||
} else {
|
} else {
|
||||||
Glib::ustring s = outputPath;
|
if (leaveUntouched) {
|
||||||
Glib::ustring::size_type ext = s.find_last_of('.');
|
outputFile = outputPath;
|
||||||
outputFile = s.substr(0, ext) + "." + outputType;
|
} else {
|
||||||
|
Glib::ustring s = outputPath;
|
||||||
|
Glib::ustring::size_type ext = s.find_last_of('.');
|
||||||
|
outputFile = s.substr(0, ext) + "." + outputType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( inputFile == outputFile) {
|
if( inputFile == outputFile) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user