mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
os: add invalid path exception to Path_base
In case the path is invalid during import raise the 'Path_invalid' exception. Issue #4088
This commit is contained in:
parent
8f30fc993d
commit
ddf6a0c276
@ -30,6 +30,7 @@ class Genode::Path_base
|
||||
public:
|
||||
|
||||
class Path_too_long { };
|
||||
class Path_invalid { };
|
||||
|
||||
protected:
|
||||
|
||||
@ -196,6 +197,9 @@ class Genode::Path_base
|
||||
|
||||
void import(char const *path, char const *pwd = 0)
|
||||
{
|
||||
if (!path)
|
||||
throw Path_invalid();
|
||||
|
||||
/*
|
||||
* Validate 'pwd' argument, if not supplied, enforce invariant
|
||||
* that 'pwd' is an absolute path.
|
||||
|
Loading…
x
Reference in New Issue
Block a user