summaryrefslogtreecommitdiff
path: root/gio/glocalfile.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-29 10:22:04 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-29 10:22:04 +0900
commitd9b5cb190cbe7b1d1486e0181e4d3b01e9552354 (patch)
tree0c96e63a80686186fca81d4c1ed68807922428e2 /gio/glocalfile.c
parentac2d6c432f28bcb3835093099e344bceaba4363e (diff)
downloadglib-d9b5cb190cbe7b1d1486e0181e4d3b01e9552354.tar.gz
glib-d9b5cb190cbe7b1d1486e0181e4d3b01e9552354.tar.bz2
glib-d9b5cb190cbe7b1d1486e0181e4d3b01e9552354.zip
Imported Upstream version 2.64.5upstream/2.64.5
Diffstat (limited to 'gio/glocalfile.c')
-rw-r--r--gio/glocalfile.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 62f30b561..5d01a4baf 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -1511,7 +1511,7 @@ g_local_file_delete (GFile *file,
{
int errsv = errno;
- /* Posix allows EEXIST too, but the more sane error
+ /* Posix allows EEXIST too, but the clearer error
is G_IO_ERROR_NOT_FOUND, and it's what nautilus
expects */
if (errsv == EEXIST)
@@ -2330,13 +2330,13 @@ g_local_file_make_directory (GFile *file,
return TRUE;
}
+#ifdef HAVE_SYMLINK
static gboolean
g_local_file_make_symbolic_link (GFile *file,
const char *symlink_value,
GCancellable *cancellable,
GError **error)
{
-#ifdef HAVE_SYMLINK
GLocalFile *local = G_LOCAL_FILE (file);
if (symlink (symlink_value, local->filename) == -1)
@@ -2359,26 +2359,8 @@ g_local_file_make_symbolic_link (GFile *file,
return FALSE;
}
return TRUE;
-#else
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, _("Symbolic links not supported"));
- return FALSE;
-#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;
}
+#endif
static gboolean
g_local_file_move (GFile *source,
@@ -2979,8 +2961,9 @@ g_local_file_file_iface_init (GFileIface *iface)
iface->delete_file = g_local_file_delete;
iface->trash = g_local_file_trash;
iface->make_directory = g_local_file_make_directory;
+#ifdef HAVE_SYMLINK
iface->make_symbolic_link = g_local_file_make_symbolic_link;
- iface->copy = g_local_file_copy;
+#endif
iface->move = g_local_file_move;
iface->monitor_dir = g_local_file_monitor_dir;
iface->monitor_file = g_local_file_monitor_file;