importer: Don't duplicate string unnecessarily

This commit is contained in:
Georges Basile Stavracas Neto
2024-11-06 10:05:27 -03:00
parent 2d75d3fb30
commit 6b92164ff2
+2 -2
View File
@@ -84,7 +84,7 @@ read_file_in_thread (GTask *task,
g_autoptr (GError) error = NULL;
g_autofree gchar *contents = NULL;
g_autofree gchar *path = NULL;
g_autofree gchar *encoding = NULL;
const gchar *encoding = NULL;
ICalComponent *component;
ICalErrorEnum ical_error;
gsize length;
@@ -122,7 +122,7 @@ read_file_in_thread (GTask *task,
return;
}
encoding = g_strdup (guess_file_encoding (contents, length));
encoding = guess_file_encoding (contents, length);
if (g_strcmp0 (encoding, "UTF-8") != 0)
{