diff --git a/src/backend/git.cpp b/src/backend/git.cpp index 7f1a9113..7fef187c 100644 --- a/src/backend/git.cpp +++ b/src/backend/git.cpp @@ -221,14 +221,14 @@ namespace loot { git_handler git; git.ui_message = (boost::format(lc::translate("An error occurred while trying to read the local masterlist's version. If this error happens again, try deleting the \".git\" folder in %1%.")) % path.parent_path().string()).str(); - if (!isRepository(path.parent_path())) { - BOOST_LOG_TRIVIAL(info) << "Unknown masterlist revision: Git repository missing."; - throw error(error::ok, lc::translate("Unknown: Git repository missing")); - } - else if (!fs::exists(path)) { + if (!fs::exists(path)) { BOOST_LOG_TRIVIAL(info) << "Unknown masterlist revision: No masterlist present."; throw error(error::ok, lc::translate("N/A: No masterlist present")); } + else if (!isRepository(path.parent_path())) { + BOOST_LOG_TRIVIAL(info) << "Unknown masterlist revision: Git repository missing."; + throw error(error::ok, lc::translate("Unknown: Git repository missing")); + } BOOST_LOG_TRIVIAL(debug) << "Existing repository found, attempting to open it."; git.call(git_repository_open(&git.repo, path.parent_path().string().c_str()));