mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 15:29:57 +00:00
vfs/cbe: fix result of SnapshotsFS.num_dirent("/")
The snapshots file system used to return the number of snapshots on 'num_dirent' when called for the root directory although it was expected to return 1. This confused the tooling ontop of the VFS. Ref #4032
This commit is contained in:
parent
f051bfa90d
commit
4c1eae97cf
@ -3007,7 +3007,10 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system
|
||||
|
||||
file_size num_dirent(char const *path) override
|
||||
{
|
||||
if (_top_dir(path) || _root_dir(path)) {
|
||||
if (_top_dir(path)) {
|
||||
return 1;
|
||||
}
|
||||
if (_root_dir(path)) {
|
||||
_snap_reg.update(_vfs_env);
|
||||
file_size const num = _snap_reg.number_of_snapshots();
|
||||
return num;
|
||||
|
Loading…
x
Reference in New Issue
Block a user