Fix writing renames to only happen on rename.
authorThomas Zander <thomas.zander@trolltech.com>
Thu, 23 Jul 2009 18:30:48 +0000 (23 21:30 +0300)
committerThomas Zander <thomas.zander@trolltech.com>
Thu, 23 Jul 2009 18:30:48 +0000 (23 21:30 +0300)
src/hunks/ChangeSet.cpp

index 605ca83..0624016 100644 (file)
@@ -541,7 +541,7 @@ void ChangeSet::writeDiff(QIODevice &outDevice, ChangeSet::Selection selection)
         bool fileHeaderWritten = false;
         if ((selection == AllHunks
                     || (selection == UserSelection && file.renameAcceptance() == Vng::Accepted))
-                && !file.oldFileName().isEmpty()
+                && !file.oldFileName().isEmpty() && !file.fileName().isEmpty()
                 && file.oldFileName() != file.fileName()) {
             writeRenameDiff(diff, file);
             continue;