From ffc84a676e0e301c9bf6fa87f42b33095e894cc7 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 12 Jul 2017 01:14:59 +0200 Subject: [PATCH] Small speedup for rawtherapee-cli when processing a whole folder of files --- rtgui/main-cli.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index f6df47119..d262d5feb 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -476,14 +476,14 @@ int processLineParams( int argc, char **argv ) try { - auto enumerator = dir->enumerate_children (); + auto enumerator = dir->enumerate_children("standard::name,standard::type"); - while (auto file = enumerator->next_file ()) { + while (auto file = enumerator->next_file()) { - const auto fileName = Glib::build_filename (argument, file->get_name ()); - bool isDir = Glib::file_test (fileName, Glib::FILE_TEST_IS_DIR); - bool notAll = allExtensions && !options.is_parse_extention (fileName); - bool notRetained = !allExtensions && !options.has_retained_extention (fileName); + const auto fileName = Glib::build_filename(argument, file->get_name()); + bool isDir = file->get_file_type() == Gio::FILE_TYPE_DIRECTORY; + bool notAll = allExtensions && !options.is_parse_extention(fileName); + bool notRetained = !allExtensions && !options.has_retained_extention(fileName); if (isDir || notAll || notRetained) { if (isDir) {