diff options
Diffstat (limited to 'src/blob.cpp')
-rw-r--r-- | src/blob.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/blob.cpp b/src/blob.cpp index 188c9c5..59e5f83 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -3,7 +3,7 @@ #include "blob.h" #include "repo.h" -GitFS::Blob::Blob(const Repo * const r, const std::string & path) : +GitFS::Blob::Blob(const Repo * const r, std::string && path) : repo(r), entry(Git::TreeEntryByPath(repo->tree, path)), blob(getBlob()), @@ -17,8 +17,12 @@ GitFS::Blob::getBlob() const { const auto mode = git_tree_entry_filemode(entry.get()); - if (S_ISDIR(mode)) throw NetFS::SystemError(EISDIR); - if (S_ISLNK(mode)) throw NetFS::SystemError(ELOOP); + if (S_ISDIR(mode)) { + throw NetFS::SystemError(EISDIR); + } + if (S_ISLNK(mode)) { + throw NetFS::SystemError(ELOOP); + } return Git::BlobLookup(repo->repo, *git_tree_entry_id(entry.get())); } |