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'.
This commit is contained in:
Stéphane Démurget 2009-10-25 11:14:36 +01:00 committed by Alexander Larsson
parent 3c57a6c7cc
commit ef6117f78d

View File

@ -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),