mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-10 21:01:49 +00:00
Strip slashes from Path in Vfs::Fs_file_system
strip_last_element at Path removes everything after the trailing slash, which causes lookup failures at the VFS server when opening directories. Issue #1648
This commit is contained in:
parent
b6c558dce9
commit
cdb44850d3
@ -174,6 +174,7 @@ class Vfs::Fs_file_system : public File_system
|
||||
|
||||
Absolute_path dir_path(path);
|
||||
dir_path.strip_last_element();
|
||||
dir_path.remove_trailing('/');
|
||||
|
||||
Absolute_path file_name(path);
|
||||
file_name.keep_only_last_element();
|
||||
@ -337,6 +338,7 @@ class Vfs::Fs_file_system : public File_system
|
||||
{
|
||||
Absolute_path dir_path(path);
|
||||
dir_path.strip_last_element();
|
||||
dir_path.remove_trailing('/');
|
||||
|
||||
Absolute_path file_name(path);
|
||||
file_name.keep_only_last_element();
|
||||
@ -361,6 +363,7 @@ class Vfs::Fs_file_system : public File_system
|
||||
*/
|
||||
Absolute_path abs_path(path);
|
||||
abs_path.strip_last_element();
|
||||
abs_path.remove_trailing('/');
|
||||
|
||||
Absolute_path symlink_name(path);
|
||||
symlink_name.keep_only_last_element();
|
||||
@ -385,12 +388,14 @@ class Vfs::Fs_file_system : public File_system
|
||||
{
|
||||
Absolute_path from_dir_path(from_path);
|
||||
from_dir_path.strip_last_element();
|
||||
from_dir_path.remove_trailing('/');
|
||||
|
||||
Absolute_path from_file_name(from_path);
|
||||
from_file_name.keep_only_last_element();
|
||||
|
||||
Absolute_path to_dir_path(to_path);
|
||||
to_dir_path.strip_last_element();
|
||||
to_dir_path.remove_trailing('/');
|
||||
|
||||
Absolute_path to_file_name(to_path);
|
||||
to_file_name.keep_only_last_element();
|
||||
@ -443,6 +448,7 @@ class Vfs::Fs_file_system : public File_system
|
||||
*/
|
||||
Absolute_path abs_path(to);
|
||||
abs_path.strip_last_element();
|
||||
abs_path.remove_trailing('/');
|
||||
|
||||
Absolute_path symlink_name(to);
|
||||
symlink_name.keep_only_last_element();
|
||||
@ -517,6 +523,7 @@ class Vfs::Fs_file_system : public File_system
|
||||
|
||||
Absolute_path dir_path(path);
|
||||
dir_path.strip_last_element();
|
||||
dir_path.remove_trailing('/');
|
||||
|
||||
Absolute_path file_name(path);
|
||||
file_name.keep_only_last_element();
|
||||
|
Loading…
x
Reference in New Issue
Block a user