mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-01 05:23:56 +00:00
general: Don't treat root directory as separator
This partially reverts commit c5216c47da
G_DIR_SEPARATOR_S exists primarily as convenience to make GLib-based
code portable to Microsoft Windows, which is not relevant to this app.
We can still use it anyway when we want to be clear that a slash is
being used as a dir separator.
The root directory's path is "/". While that's the exact same character
as a directory separator, its meaning is completely different.
This commit is contained in:
parent
c1646b3411
commit
c4068e6196
|
@ -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 (G_DIR_SEPARATOR_S, relative, NULL);
|
||||
abs = g_strconcat ("/", relative, NULL);
|
||||
g_free (relative);
|
||||
return abs;
|
||||
}
|
||||
|
|
|
@ -408,7 +408,7 @@ action_prompt_for_location_root (GSimpleAction *action,
|
|||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
prompt_for_location (NAUTILUS_WINDOW (user_data), G_DIR_SEPARATOR_S);
|
||||
prompt_for_location (NAUTILUS_WINDOW (user_data), "/");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue