From 36c208235a02fd86e8614e2babe19d6d99f354bd Mon Sep 17 00:00:00 2001 From: Eric Bryant Date: Thu, 20 Dec 2018 01:18:47 -0500 Subject: [PATCH] cope with missing trailing slash --- nmpfilter/nmpbyregion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nmpfilter/nmpbyregion.cpp b/nmpfilter/nmpbyregion.cpp index cd3dcaaf..ae1fbbce 100644 --- a/nmpfilter/nmpbyregion.cpp +++ b/nmpfilter/nmpbyregion.cpp @@ -72,6 +72,7 @@ int main(int argc, char *argv[]) // Attempt to find most recent commit info string MasterInfo; string MasterPath = argv[1]; + if (MasterPath.back() != '/') MasterPath += '/'; MasterPath += "../.git/refs/heads/master"; ifstream MasterFile(MasterPath.data()); if (MasterFile)