gfile: Fix g_file_peek_path() for remote locations

g_file_peek_path() doesn't work for GVfs locations on the first attempt,
because the compare-and-swap loop is broken before the return value is
set.
This commit is contained in:
Ondrej Holy 2020-01-29 14:51:38 +01:00 committed by Philip Withnall
parent b4f6333783
commit 197ea9fe43

View File

@ -568,7 +568,10 @@ file_peek_path_generic (GFile *file)
if (g_object_replace_qdata ((GObject *) file, _file_path_quark,
NULL, (gpointer) new_path,
(GDestroyNotify) g_free, NULL))
break;
{
path = new_path;
break;
}
else
g_free (new_path);
}