app: file_procedure_find(): check magics only for native files
This commit is contained in:
@ -84,13 +84,8 @@ file_procedure_find (GSList *procs,
|
||||
GError **error)
|
||||
{
|
||||
GimpPlugInProcedure *file_proc;
|
||||
GSList *list;
|
||||
GimpPlugInProcedure *size_matched_proc = NULL;
|
||||
GInputStream *input = NULL;
|
||||
gboolean opened = FALSE;
|
||||
gsize head_size = 0;
|
||||
gint size_match_count = 0;
|
||||
guchar head[256];
|
||||
|
||||
g_return_val_if_fail (procs != NULL, NULL);
|
||||
g_return_val_if_fail (G_IS_FILE (file), NULL);
|
||||
@ -117,7 +112,15 @@ file_procedure_find (GSList *procs,
|
||||
if (file_proc)
|
||||
return file_proc;
|
||||
|
||||
/* Then look for magics */
|
||||
/* Then look for magics, but not on remote files */
|
||||
if (g_file_is_native (file))
|
||||
{
|
||||
GSList *list;
|
||||
GInputStream *input = NULL;
|
||||
gboolean opened = FALSE;
|
||||
gsize head_size = 0;
|
||||
guchar head[256];
|
||||
|
||||
for (list = procs; list; list = g_slist_next (list))
|
||||
{
|
||||
file_proc = list->data;
|
||||
@ -187,6 +190,7 @@ file_procedure_find (GSList *procs,
|
||||
|
||||
g_object_unref (input);
|
||||
}
|
||||
}
|
||||
|
||||
if (size_match_count == 1)
|
||||
return size_matched_proc;
|
||||
|
Reference in New Issue
Block a user