From 2716d04595edb4ecb916994ce44b4955d6107654 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Fri, 12 Jun 2009 07:53:29 +0200 Subject: [PATCH] fix more encoding issues for non-latin1 filenames --- src/commands/UnRecord.cpp | 4 ++-- src/commands/WhatsNew.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/UnRecord.cpp b/src/commands/UnRecord.cpp index 869823a..70adff1 100644 --- a/src/commands/UnRecord.cpp +++ b/src/commands/UnRecord.cpp @@ -172,9 +172,9 @@ AbstractCommand::ReturnCodes UnRecord::unRecord() for (int i=0; i < changeSet.count(); ++i) { File file = changeSet.file(i); if (file.oldFileName().isEmpty()) - addFilesList << file.fileName(); + addFilesList << QString::fromUtf8(file.fileName()); else if (! file.fileName().isEmpty()) // ignore removed files, git will notice this - addFilesList << file.fileName(); + addFilesList << QString::fromUtf8(file.fileName()); } if (dryRun()) diff --git a/src/commands/WhatsNew.cpp b/src/commands/WhatsNew.cpp index 65fc8c6..c3c84fa 100644 --- a/src/commands/WhatsNew.cpp +++ b/src/commands/WhatsNew.cpp @@ -83,9 +83,9 @@ AbstractCommand::ReturnCodes WhatsNew::printWhatsNew(bool unified, bool chatty) qint64 lineLength = Vng::readLine(&git, buf, sizeof(buf)); if (lineLength == -1) break; - QString line = QString::fromUtf8(buf, lineLength); + QString line = QString::fromUtf8(File::escapeGitFilename(QByteArray(buf, lineLength-1))); if (!m_excludeMatcher.isExcluded(line)) - out << "a " << line; + out << "a " << line << endl; } } else if (changeSet.count() == 0) { -- 2.11.4.GIT