RT opens console window on Windows when a filename or a name of a folder is passed as argument, Issue 2300
This commit is contained in:
parent
f63cf64bcf
commit
77e97be151
@ -154,6 +154,7 @@ int main(int argc, char **argv)
|
|||||||
bool consoleOpened = false;
|
bool consoleOpened = false;
|
||||||
|
|
||||||
if (argc>1 || options.rtSettings.verbose){
|
if (argc>1 || options.rtSettings.verbose){
|
||||||
|
if(options.rtSettings.verbose || ( !safe_file_test( safe_filename_to_utf8(argv[1]), Glib::FILE_TEST_EXISTS ) && !safe_file_test( safe_filename_to_utf8(argv[1]), Glib::FILE_TEST_IS_DIR ))) {
|
||||||
bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001);
|
bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001);
|
||||||
bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001);
|
bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001);
|
||||||
// no console, if stdout and stderr both are redirected to file
|
// no console, if stdout and stderr both are redirected to file
|
||||||
@ -188,6 +189,8 @@ int main(int argc, char **argv)
|
|||||||
std::cout << "RawTherapee, version " << VERSION << std::endl;
|
std::cout << "RawTherapee, version " << VERSION << std::endl;
|
||||||
std::cout << "WARNING: closing this window will close RawTherapee!" << std::endl << std::endl;
|
std::cout << "WARNING: closing this window will close RawTherapee!" << std::endl << std::endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int ret = processLineParams( argc, argv);
|
int ret = processLineParams( argc, argv);
|
||||||
if( ret <= 0 ) {
|
if( ret <= 0 ) {
|
||||||
if(consoleOpened) {
|
if(consoleOpened) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user