diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:59 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:59 +0200 |
commit | d4af25c52a28b93484ffb55e0a8027bc4ce7856f (patch) | |
tree | 853d57468d6b370711e7a5dd2c3dc7d5bac81b10 /zen/last_error.h | |
parent | 5.8 (diff) | |
download | FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.gz FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.bz2 FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.zip |
5.9
Diffstat (limited to 'zen/last_error.h')
-rw-r--r-- | zen/last_error.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/zen/last_error.h b/zen/last_error.h index 356192ab..72d54d48 100644 --- a/zen/last_error.h +++ b/zen/last_error.h @@ -76,18 +76,18 @@ ErrorCode getLastError() #ifdef FFS_WIN return ::GetLastError(); #elif defined FFS_LINUX - return errno; + return errno; //don't use "::", errno is a macro! #endif } inline std::wstring getLastErrorFormatted(ErrorCode lastError) { -#ifdef FFS_WIN //determine error code if none was specified if (lastError == 0) - lastError = ::GetLastError(); + lastError = getLastError(); +#ifdef FFS_WIN std::wstring output = _("Windows Error Code %x:"); replace(output, L"%x", numberTo<std::wstring>(lastError)); @@ -108,10 +108,6 @@ std::wstring getLastErrorFormatted(ErrorCode lastError) return output; #elif defined FFS_LINUX - //determine error code if none was specified - if (lastError == 0) - lastError = errno; //don't use "::", errno is a macro! - std::wstring output = _("Linux Error Code %x:"); replace(output, L"%x", numberTo<std::wstring>(lastError)); |