diff options
author | Uli Heilmeier <uh@heilmeier.eu> | 2019-08-22 06:13:47 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2019-11-05 22:40:27 +0000 |
commit | 3361109b15ad0acd2fc4e3db93ab8358aae5ea78 (patch) | |
tree | 010ceea5b63e44017497abb5f9f741e96a6e0fa8 /ui/cli | |
parent | 152e0114c127d39415f2a7a634a0c42fc1730d22 (diff) |
QT/CLI: Remove limit for object export files
Removes the limit to export more than 1000 files with the same name
when exporting objects.
For this a preference name gui.max_export_objects is used.
Bug: 16010
Change-Id: Iefc138ac2617491aad3b6ad5827c9058aed112c7
Reviewed-on: https://code.wireshark.org/review/34339
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-exportobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/cli/tap-exportobject.c b/ui/cli/tap-exportobject.c index 8a0fe5bf40..73d5b2c794 100644 --- a/ui/cli/tap-exportobject.c +++ b/ui/cli/tap-exportobject.c @@ -108,7 +108,7 @@ eo_draw(void *tapdata) gchar* save_in_path = (gchar*)g_hash_table_lookup(eo_opts, proto_get_protocol_filter_name(get_eo_proto_id(object_list->eo))); GString *safe_filename = NULL; gchar *save_as_fullpath = NULL; - int count = 0; + guint count = 0; if (!g_file_test(save_in_path, G_FILE_TEST_IS_DIR)) { /* If the destination directory (or its parents) do not exist, create them. */ @@ -137,7 +137,7 @@ eo_draw(void *tapdata) } save_as_fullpath = g_build_filename(save_in_path, safe_filename->str, NULL); g_string_free(safe_filename, TRUE); - } while (g_file_test(save_as_fullpath, G_FILE_TEST_EXISTS) && ++count < 1000); + } while (g_file_test(save_as_fullpath, G_FILE_TEST_EXISTS) && ++count < prefs.gui_max_export_objects); count = 0; eo_save_entry(save_as_fullpath, entry); g_free(save_as_fullpath); |