[Pkg-owncloud-commits] [owncloud-client] 27/83: Use the moved implementation of the name clash detection method.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 31 11:31:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 1b2875c20a70db2151b0e15075da55a725851470
Author: Klaas Freitag <freitag at owncloud.com>
Date: Fri May 23 18:56:25 2014 +0200
Use the moved implementation of the name clash detection method.
---
src/mirall/propagatorjobs.cpp | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/src/mirall/propagatorjobs.cpp b/src/mirall/propagatorjobs.cpp
index 72cc7ad..6006435 100644
--- a/src/mirall/propagatorjobs.cpp
+++ b/src/mirall/propagatorjobs.cpp
@@ -44,11 +44,6 @@
#include <neon/ne_compress.h>
#include <neon/ne_redirect.h>
-#ifdef Q_OS_WIN
-#include <windef.h>
-#include <winbase.h>
-#endif
-
#include <time.h>
@@ -99,32 +94,6 @@ void PropagateLocalRemove::start()
done(SyncFileItem::Success);
}
-bool PropagateLocalMkdir::hasCaseClash( const QString& file )
-{
- bool re = false;
-
- qDebug() << "CaseClashCheck for " << file;
-#ifdef Q_OS_WIN
- WIN32_FIND_DATA FindFileData;
- HANDLE hFind;
-
- hFind = FindFirstFileW( (wchar_t*)file.utf16(), &FindFileData);
- if (hFind == INVALID_HANDLE_VALUE) {
- qDebug() << "FindFirstFile failed " << GetLastError();
- // returns false.
- } else {
- QString realFileName = QString::fromWCharArray( FindFileData.cFileName );
- qDebug() << Q_FUNC_INFO << "Real file name is " << realFileName;
- FindClose(hFind);
-
- if( ! file.endsWith(realFileName, Qt::CaseSensitive) ) {
- re = true;
- }
- }
-#endif
- return re;
-}
-
void PropagateLocalMkdir::start()
{
if (_propagator->_abortRequested.fetchAndAddRelaxed(0))
@@ -132,7 +101,8 @@ void PropagateLocalMkdir::start()
QDir newDir(_propagator->_localDir + _item._file);
QString newDirStr = QDir::toNativeSeparators(newDir.path());
- if( Utility::fsCasePreserving() && newDir.exists() && hasCaseClash(_propagator->_localDir + _item._file ) ) { // add a check on the file name
+ if( Utility::fsCasePreserving() && newDir.exists() &&
+ _propagator->localFileNameClash(_item._file ) ) {
qDebug() << "WARN: new directory to create locally already exists!";
done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirStr) );
return;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list