[Pkg-owncloud-commits] [owncloud-client] 04/89: Fix Win32 move file operation.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:28 UTC 2013
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 883576cb9534eb5a30784a68e3f3707faaf330fd
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue Dec 3 17:07:21 2013 +0100
Fix Win32 move file operation.
---
src/mirall/owncloudpropagator.cpp | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index 2294d78..9f3d011 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -41,6 +41,11 @@
#include <time.h>
+#ifdef Q_OS_WIN
+#include <windef.h>
+#include <winbase.h>
+#endif
+
// We use some internals of csync:
extern "C" int c_utimes(const char *, const struct timeval *);
extern "C" void csync_win32_set_file_hidden( const char *file, bool h );
@@ -805,9 +810,11 @@ void PropagateDownloadFile::start()
return;
}
#else //Q_OS_WIN
- if (::MoveFileEx((wchar_t*)tmpFile.fileName().utf16(),
- (wchar_t*)QString(_localDir + item._file).utf16(),
- MOVEFILE_REPLACE_EXISTING) != 0) {
+ BOOL ok;
+ ok = MoveFileEx((wchar_t*)tmpFile.fileName().utf16(),
+ (wchar_t*)QString(_propagator->_localDir + _item._file).utf16(),
+ MOVEFILE_REPLACE_EXISTING+MOVEFILE_COPY_ALLOWED+MOVEFILE_WRITE_THROUGH);
+ if (!ok) {
wchar_t *string = 0;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL, ::GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
--
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