mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-02 14:03:39 +00:00
general: Use the defined constant for path separator
This commit is contained in:
parent
b75bd46f49
commit
c5216c47da
|
@ -6392,7 +6392,7 @@ get_abs_path_for_symlink (GFile *file,
|
|||
|
||||
relative = g_file_get_relative_path (root, file);
|
||||
g_object_unref (root);
|
||||
abs = g_strconcat ("/", relative, NULL);
|
||||
abs = g_strconcat (G_DIR_SEPARATOR_S, relative, NULL);
|
||||
g_free (relative);
|
||||
return abs;
|
||||
}
|
||||
|
|
|
@ -1875,7 +1875,7 @@ nautilus_file_can_rename_file (NautilusFile *file,
|
|||
|
||||
/* Return an error for incoming names containing path separators.
|
||||
* But not for .desktop files as '/' are allowed for them */
|
||||
if (strstr (new_name, "/") != NULL)
|
||||
if (strstr (new_name, G_DIR_SEPARATOR_S) != NULL)
|
||||
{
|
||||
error = g_error_new (G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
|
||||
_("Slashes are not allowed in filenames"));
|
||||
|
|
|
@ -408,7 +408,7 @@ action_prompt_for_location_root (GSimpleAction *action,
|
|||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
prompt_for_location (NAUTILUS_WINDOW (user_data), "/");
|
||||
prompt_for_location (NAUTILUS_WINDOW (user_data), G_DIR_SEPARATOR_S);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue