diff options
author | Sergey Ponomarev <stokito@gmail.com> | 2019-09-01 23:02:46 +0300 |
---|---|---|
committer | Alexander Schwinn <alexxcons@xfce.org> | 2019-09-03 22:45:29 +0200 |
commit | 0c74c71708f0736b397713ddc7d574445e380953 (patch) | |
tree | 99520daf600756db2df13ce0591ecf5d587d93fb /plugins | |
parent | 9ad5d93e824bd8a227b6976829ae6b1a775ff930 (diff) | |
download | thunar-0c74c71708f0736b397713ddc7d574445e380953.tar.gz |
sendto plugin: move g_file_info_get_content_type() call out of the cycle
(Bug #15916)
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Signed-off-by: Alexander Schwinn <alexxcons@xfce.org>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/thunar-sendto-email/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/thunar-sendto-email/main.c b/plugins/thunar-sendto-email/main.c index 23b8c14a..9b212b14 100644 --- a/plugins/thunar-sendto-email/main.c +++ b/plugins/thunar-sendto-email/main.c @@ -163,12 +163,11 @@ tse_ask_compress (GList *infos) if (g_file_info_get_file_type (tse_data->info) == G_FILE_TYPE_DIRECTORY) return TSE_RESPONSE_COMPRESS; + /* determine the content type */ + content_type = g_file_info_get_content_type (tse_data->info); /* check if the single file is already an archive */ for (n = 0; n < G_N_ELEMENTS (TSE_MIME_TYPES); ++n) { - /* determine the content type */ - content_type = g_file_info_get_content_type (tse_data->info); - /* check if this mime type matches */ if (content_type != NULL && g_content_type_is_a (content_type, TSE_MIME_TYPES[n])) { @@ -183,7 +182,7 @@ tse_ask_compress (GList *infos) } /* check if the total size is larger than 200KiB, or we have more than - * one file, and atleast one of the files is not already an archive. + * one file, and at least one of the files is not already an archive. */ if ((n_infos > 1 || total_size > 200 * 1024) && n_infos != n_archives) { |