Skip to content

Commit f3bc4dc

Browse files
committed
Fix error handling in the directory iterator on Windows. Fix incorrect timeout setting for no-space retries in the changelog. Thanks to Vlad Khorsun.
1 parent 8c40a01 commit f3bc4dc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/common/os/win32/path_utils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ void Win32DirIterator::init()
5656

5757
if (dir == INVALID_HANDLE_VALUE)
5858
{
59-
if (GetLastError() != ERROR_FILE_NOT_FOUND)
59+
auto const last_error = GetLastError();
60+
if (last_error != ERROR_FILE_NOT_FOUND && last_error != ERROR_PATH_NOT_FOUND)
6061
system_call_failed::raise("FindFirstFile");
6162

6263
dir = 0;

src/jrd/replication/ChangeLog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ using namespace Replication;
6666

6767
namespace
6868
{
69-
inline constexpr unsigned FLUSH_WAIT_INTERVAL = 1; // milliseconds
69+
inline constexpr unsigned FLUSH_WAIT_INTERVAL = 1; // milliseconds
7070

71-
inline constexpr unsigned NO_SPACE_TIMEOUT = 10; // seconds
71+
inline constexpr unsigned NO_SPACE_TIMEOUT = 10000; // milliseconds
7272
inline constexpr unsigned NO_SPACE_RETRIES = 6; // up to one minute
7373

7474
inline constexpr unsigned COPY_BLOCK_SIZE = 64 * 1024; // 64 KB

0 commit comments

Comments
 (0)