1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-07-02 16:31:15 +00:00

general: Use the defined constant for path separator

This commit is contained in:
Khalid Abu Shawarib 2023-12-30 17:54:05 +03:00 committed by Peter Eisenmann
parent b75bd46f49
commit c5216c47da
3 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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"));

View File

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