diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-07-08 17:27:48 +0300 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-12-15 12:59:16 +0300 |
commit | 2887a93c4029991f223e832319fc382528894097 (patch) | |
tree | 76fd5c14c4bca342c80cb7a490fd21c45af52eec /src/common | |
parent | 7fa7bc54c491df76c9ce1127cf985e148f417333 (diff) |
Win: Use full Windows paths in file watcher and improve logging
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/filesystembase.cpp | 2 | ||||
-rw-r--r-- | src/common/utility.h | 5 |
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 } |