diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-07-22 20:08:39 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-07-22 20:08:39 +0100 |
commit | 6168d85a886286a43b55a0cd6739a1e1e3987d90 (patch) | |
tree | 36360a309a20b6ab344f25ec80b902d2e27fbad5 /src/dir.cpp | |
parent | Basically all the core functionality (diff) | |
download | netfs-gitfs-6168d85a886286a43b55a0cd6739a1e1e3987d90.tar.bz2 netfs-gitfs-6168d85a886286a43b55a0cd6739a1e1e3987d90.tar.xz netfs-gitfs-6168d85a886286a43b55a0cd6739a1e1e3987d90.zip |
Unline git helpers and throw NetFS exceptions
Diffstat (limited to 'src/dir.cpp')
-rw-r--r-- | src/dir.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/dir.cpp b/src/dir.cpp index cee26f0..c590450 100644 --- a/src/dir.cpp +++ b/src/dir.cpp @@ -19,14 +19,9 @@ GitFS::Directory::getSubtree() const subTreeCache = repo->tree; } else { - try { - auto e = Git::TreeEntryByPath(repo->tree, path); - if (!S_ISDIR(git_tree_entry_filemode(e.get()))) throw NetFS::SystemError(ENOTDIR); - subTreeCache = Git::TreeLookup(repo->repo, *git_tree_entry_id(e.get())); - } - catch (const Git::Error & e) { - Git::ErrorToSystemError(e); - } + auto e = Git::TreeEntryByPath(repo->tree, path); + if (!S_ISDIR(git_tree_entry_filemode(e.get()))) throw NetFS::SystemError(ENOTDIR); + subTreeCache = Git::TreeLookup(repo->repo, *git_tree_entry_id(e.get())); } subTreeCacheRootId = *git_tree_id(repo->tree.get()); } |