mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 23:46:15 +01:00
gio: Clear error properly to prevent crash
https://bugzilla.gnome.org/show_bug.cgi?id=711070
This commit is contained in:
parent
c8aba61713
commit
1a037b1408
@ -2505,7 +2505,7 @@ copy_symlink (GFile *destination,
|
|||||||
if (!tried_delete && (flags & G_FILE_COPY_OVERWRITE) &&
|
if (!tried_delete && (flags & G_FILE_COPY_OVERWRITE) &&
|
||||||
my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_EXISTS)
|
my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_EXISTS)
|
||||||
{
|
{
|
||||||
g_error_free (my_error);
|
g_clear_error (&my_error);
|
||||||
|
|
||||||
/* Don't overwrite if the destination is a directory */
|
/* Don't overwrite if the destination is a directory */
|
||||||
info = g_file_query_info (destination, G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
info = g_file_query_info (destination, G_FILE_ATTRIBUTE_STANDARD_TYPE,
|
||||||
|
Loading…
Reference in New Issue
Block a user