mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
glocalfile: Don’t define unsupported copy vfunc
The caller assumes that an unimplemented vfunc means that copying is unsupported (and falls back to its internal copy implementation), so there’s no point in implementing the vfunc just to unconditionally return `G_IO_ERROR_NOT_SUPPORTED`. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
1b7ab81c1c
commit
7d2bce82e2
@ -2362,20 +2362,6 @@ g_local_file_make_symbolic_link (GFile *file,
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
g_local_file_copy (GFile *source,
|
||||
GFile *destination,
|
||||
GFileCopyFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GFileProgressCallback progress_callback,
|
||||
gpointer progress_callback_data,
|
||||
GError **error)
|
||||
{
|
||||
/* Fall back to default copy */
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Copy not supported");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_local_file_move (GFile *source,
|
||||
GFile *destination,
|
||||
@ -2978,7 +2964,6 @@ g_local_file_file_iface_init (GFileIface *iface)
|
||||
#ifdef HAVE_SYMLINK
|
||||
iface->make_symbolic_link = g_local_file_make_symbolic_link;
|
||||
#endif
|
||||
iface->copy = g_local_file_copy;
|
||||
iface->move = g_local_file_move;
|
||||
iface->monitor_dir = g_local_file_monitor_dir;
|
||||
iface->monitor_file = g_local_file_monitor_file;
|
||||
|
Loading…
Reference in New Issue
Block a user