mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
GLocalFile: add error handle for trash info file writing
This commit is contained in:
parent
f0bc060e89
commit
95c4312941
@ -2278,9 +2278,18 @@ g_local_file_trash (GFile *file,
|
||||
original_name_escaped, delete_time);
|
||||
g_free (delete_time);
|
||||
|
||||
g_file_set_contents_full (infofile, data, -1,
|
||||
if (!g_file_set_contents_full (infofile, data, -1,
|
||||
G_FILE_SET_CONTENTS_CONSISTENT | G_FILE_SET_CONTENTS_ONLY_EXISTING,
|
||||
0600, NULL);
|
||||
0600, error))
|
||||
{
|
||||
g_unlink (infofile);
|
||||
|
||||
g_free (filesdir);
|
||||
g_free (trashname);
|
||||
g_free (infofile);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* TODO: Maybe we should verify that you can delete the file from the trash
|
||||
* before moving it? OTOH, that is hard, as it needs a recursive scan
|
||||
|
Loading…
Reference in New Issue
Block a user