From 70499909cc1dfed644aefbc9fa47eb7e8359dad1 Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Mon, 12 Apr 2010 20:37:06 +0200 Subject: Fix logical error (deleted paths was ignored) Improve the ruleparser so that prefix never starts or ends with a '/' --- src/ruleparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ruleparser.cpp') diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp index 7ae9570..6e78efe 100644 --- a/src/ruleparser.cpp +++ b/src/ruleparser.cpp @@ -102,7 +102,9 @@ void Rules::load() } else if (matchPrefixLine.exactMatch(line)) { match.prefix = matchPrefixLine.cap(1); if( match.prefix.startsWith('/')) - qFatal("Prefix starts with \"/\" on line %d, this can cause git-fast-import to crach.", lineNumber ); + match.prefix = match.prefix.mid(1); + if( match.prefix.endsWith('/')) + match.prefix.chop(1); continue; } else if (matchActionLine.exactMatch(line)) { QString action = matchActionLine.cap(1); -- cgit v1.2.1