Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2020-07-08 17:27:48 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-12-15 12:59:16 +0300
commit2887a93c4029991f223e832319fc382528894097 (patch)
tree76fd5c14c4bca342c80cb7a490fd21c45af52eec /src/common
parent7fa7bc54c491df76c9ce1127cf985e148f417333 (diff)
Win: Use full Windows paths in file watcher and improve logging
Diffstat (limited to 'src/common')
-rw-r--r--src/common/filesystembase.cpp2
-rw-r--r--src/common/utility.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/common/filesystembase.cpp b/src/common/filesystembase.cpp
index 3bc0a11df..594817135 100644
--- a/src/common/filesystembase.cpp
+++ b/src/common/filesystembase.cpp
@@ -141,7 +141,7 @@ bool FileSystem::rename(const QString &originFileName,
(wchar_t *)dest.utf16(),
MOVEFILE_COPY_ALLOWED | MOVEFILE_WRITE_THROUGH);
if (!success) {
- error = Utility::formatWinError();
+ error = Utility::formatLastWinError();
}
} else
#endif
diff --git a/src/common/utility.h b/src/common/utility.h
index 3fe99e821..ad18c9f1c 100644
--- a/src/common/utility.h
+++ b/src/common/utility.h
@@ -249,7 +249,10 @@ namespace Utility {
OCSYNC_EXPORT void FiletimeToLargeIntegerFiletime(FILETIME *filetime, LARGE_INTEGER *hundredNSecs);
OCSYNC_EXPORT void UnixTimeToLargeIntegerFiletime(time_t t, LARGE_INTEGER *hundredNSecs);
- OCSYNC_EXPORT QString formatWinError(long error = GetLastError());
+ OCSYNC_EXPORT QString formatWinError(long error);
+ inline QString formatLastWinError() {
+ return formatWinError(GetLastError());
+ };
#endif
}