[glib] Bug 324930 - Nicer message for EPERM on symlink
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] Bug 324930 - Nicer message for EPERM on symlink
- Date: Thu, 5 Nov 2009 14:59:13 +0000 (UTC)
commit ef6117f78d036b956d3fe91f6a3748f64499f4c1
Author: Stéphane Démurget <stephane demurget free fr>
Date: Sun Oct 25 11:14:36 2009 +0100
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'.
gio/glocalfile.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]