aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ruleparser.cpp4
-rw-r--r--src/svn.cpp8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index 6e78efe..905115c 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -103,8 +103,8 @@ void Rules::load()
match.prefix = matchPrefixLine.cap(1);
if( match.prefix.startsWith('/'))
match.prefix = match.prefix.mid(1);
- if( match.prefix.endsWith('/'))
- match.prefix.chop(1);
+ if( !match.prefix.endsWith('/'))
+ match.prefix.append('/');
continue;
} else if (matchActionLine.exactMatch(line)) {
QString action = matchActionLine.cap(1);
diff --git a/src/svn.cpp b/src/svn.cpp
index 1bc108b..ea19be3 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -216,11 +216,8 @@ static void splitPathName(const Rules::Match &rule, const QString &pathName, QSt
}
if (path_p) {
- QString path = pathName.mid(svnprefix.length());
- if( !path.isEmpty() && !rule.prefix.isEmpty() )
- path.prepend('/');
QString prefix = svnprefix.replace(rule.rx, rule.prefix);
- *path_p = prefix + path;
+ *path_p = prefix + pathName.mid(svnprefix.length());
}
}
@@ -655,7 +652,8 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha
dumpBlob(txn, fs_root, key, path, pool);
} else {
QString pathNoSlash = path;
- pathNoSlash.chop(1);
+ if(pathNoSlash.endsWith('/'))
+ pathNoSlash.chop(1);
txn->deleteFile(pathNoSlash);
recursiveDumpDir(txn, fs_root, key, path, pool);
}