From 97b1aae251a48af7b85eafd76e5284458d42f181 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 27 Oct 2019 12:01:06 +0000 Subject: Fixes for tidy --- src/blob.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/blob.cpp') 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())); } -- cgit v1.2.3