vfs: catch lookup-failed exception on node discovery

This commit is contained in:
Christian Helmuth 2014-05-15 16:19:43 +02:00
parent 8ef8e8ede9
commit 973d710101
1 changed files with 4 additions and 2 deletions

View File

@ -483,9 +483,11 @@ class Vfs::Fs_file_system : public File_system
path = "/";
/*
* XXX handle exceptions
* XXX handle more exceptions
*/
::File_system::Node_handle node = _fs.node(path);
::File_system::Node_handle node;
try { node = _fs.node(path); } catch (::File_system::Lookup_failed) { return 0; }
Fs_handle_guard node_guard(_fs, node);
::File_system::Status status = _fs.status(node);