From 5d9df31bf640bbbbfbb30d0163f9f2571cc1b81b Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Wed, 14 Apr 2010 19:46:38 +0200 Subject: Move slash cleaning to a more generic place --- src/repository.cpp | 5 ++++- src/svn.cpp | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/repository.cpp b/src/repository.cpp index df0df8f..922027d 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -298,7 +298,10 @@ void Repository::Transaction::setLog(const QByteArray &l) void Repository::Transaction::deleteFile(const QString &path) { - deletedFiles.append(path); + QString pathNoSlash = path; + if(pathNoSlash.endsWith('/')) + pathNoSlash.chop(1); + deletedFiles.append(pathNoSlash); } QIODevice *Repository::Transaction::addFile(const QString &path, int mode, qint64 length) diff --git a/src/svn.cpp b/src/svn.cpp index 9bbfab1..105e310 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -650,10 +650,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha } else if (!current.endsWith('/')) { dumpBlob(txn, fs_root, key, path, pool); } else { - QString pathNoSlash = path; - if(pathNoSlash.endsWith('/')) - pathNoSlash.chop(1); - txn->deleteFile(pathNoSlash); + txn->deleteFile(path); recursiveDumpDir(txn, fs_root, key, path, pool); } -- cgit v1.2.1