From: Stéphane Démurget Date: Sun, 25 Oct 2009 10:14:36 +0000 (+0100) Subject: Bug 324930 - Nicer message for EPERM on symlink X-Git-Tag: 2.23.0~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef6117f78d036b956d3fe91f6a3748f64499f4c1;p=platform%2Fupstream%2Fglib.git Bug 324930 - Nicer message for EPERM on symlink Introduced a more precise error message for EPERM when symlinking to a local filesystem. EPERM on symlink means symlinking is not supported by the underlying fs so it is not the general meaning of EPERM which roughly translates to 'Operation not permitted'. --- diff --git a/gio/glocalfile.c b/gio/glocalfile.c index f6036e3..6a42f53 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -2151,6 +2151,10 @@ g_local_file_make_symbolic_link (GFile *file, g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_FILENAME, _("Invalid filename")); + else if (errsv == EPERM) + g_set_error (error, G_IO_ERROR, + G_IO_ERROR_NOT_SUPPORTED, + _("Filesystem does not support symbolic links")); else g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),