Don't hardcode '/' (#502727)

2007-12-10  Alexander Larsson  <alexl@redhat.com>

	* gfile.c (g_file_set_display_name):
	Don't hardcode '/' (#502727)


svn path=/trunk/; revision=6084
This commit is contained in:
Alexander Larsson
2007-12-10 11:19:41 +00:00
committed by Alexander Larsson
parent 3a44f82b82
commit 51eb9d19bd
2 changed files with 7 additions and 2 deletions

View File

@@ -2318,12 +2318,12 @@ g_file_set_display_name (GFile *file,
g_return_val_if_fail (G_IS_FILE (file), NULL);
g_return_val_if_fail (display_name != NULL, NULL);
if (strchr (display_name, '/') != NULL)
if (strchr (display_name, G_DIR_SEPARATOR) != NULL)
{
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
_("File names cannot contain '/'"));
_("File names cannot contain '%c'"), G_DIR_SEPARATOR);
return NULL;
}