diff options
Diffstat (limited to 'libbutl/filesystem.cxx')
-rw-r--r-- | libbutl/filesystem.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx index 7db26a5..9e8a232 100644 --- a/libbutl/filesystem.cxx +++ b/libbutl/filesystem.cxx @@ -2573,11 +2573,14 @@ namespace butl // // Make sure that the error denotes errno portable code. // - assert (e.code ().category () == generic_category ()); + if (e.code ().category () == generic_category ()) + { + int ec (e.code ().value ()); + if (ec == ENOENT || ec == ENOTDIR) + return; + } - int ec (e.code ().value ()); - if (ec != ENOENT && ec != ENOTDIR) - throw; + throw; } } |