Skip to content

Commit

Permalink
Fixed test on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Oct 31, 2023
1 parent 29e1210 commit 346acb7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/fineftp_test/src/permission_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@

namespace
{
#ifdef WIN32
constexpr int curl_return_code_quote_command_error = 21;
constexpr int curl_return_code_upload_failed = 25;
constexpr int curl_return_code_login_failed = 67;
#else
// I have absolutely no idea, why the return codes are shifted by 8 bit on Linux and macOS.
// However, for some reasons they are.
// Here are the original return codes, that are only true on Windows:
// https://everything.curl.dev/usingcurl/returns
constexpr int curl_return_code_quote_command_error = 21 << 8;
constexpr int curl_return_code_upload_failed = 25 << 8;
constexpr int curl_return_code_login_failed = 67 << 8;
#endif // WIN32

struct DirPreparer
{
Expand Down

0 comments on commit 346acb7

Please sign in to comment.