Skip to content

Commit 08437bf

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 4aac556 commit 08437bf

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
@@ -55,7 +55,8 @@ void Win32DirIterator::init()
5555

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

6162
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-
const unsigned FLUSH_WAIT_INTERVAL = 1; // milliseconds
69+
const unsigned FLUSH_WAIT_INTERVAL = 1; // milliseconds
7070

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

7474
const unsigned COPY_BLOCK_SIZE = 64 * 1024; // 64 KB

0 commit comments

Comments
 (0)