diff options
Diffstat (limited to 'mythfs/service/inodes/allDirectory.cpp')
-rw-r--r-- | mythfs/service/inodes/allDirectory.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mythfs/service/inodes/allDirectory.cpp b/mythfs/service/inodes/allDirectory.cpp index d61b8b9..d7745f6 100644 --- a/mythfs/service/inodes/allDirectory.cpp +++ b/mythfs/service/inodes/allDirectory.cpp @@ -1,6 +1,7 @@ #include "allDirectory.h" #include <util.h> #include "symlink.h" +#include <exceptions.h> namespace MythFS { AllDirectory::AllDirectory(const DBPrx & d) : db(d) { } @@ -14,6 +15,12 @@ namespace MythFS { Node::PointerType AllDirectory::getChild(const std::string & path) const { + auto rs = db->getRecorded(); + if (std::find_if(rs.begin(), rs.end(), [path](auto r) { + return r->basename == path; + }) == rs.end()) { + throw NetFS::SystemError(ENOENT); + } return new Symlink("/var/store/mythrecordings/" + path); } } |