Skip to content

Commit 336e98b

Browse files
authored
Moved dwFlags declaration to beginning of scope
1 parent 37a7adb commit 336e98b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/win32/posix_w32.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,13 @@ int p_readlink(const char *path, char *buf, size_t bufsiz)
397397
int p_symlink(const char *target, const char *path)
398398
{
399399
git_win32_path target_w, path_w;
400+
DWORD dwFlags;
400401

401402
if (git_win32_path_from_utf8(path_w, path) < 0 ||
402403
git__utf8_to_16(target_w, MAX_PATH, target) < 0)
403404
return -1;
404405

405-
DWORD dwFlags = SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
406+
dwFlags = SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
406407

407408
if (GetFileAttributesW(target_w) & FILE_ATTRIBUTE_DIRECTORY)
408409
dwFlags |= SYMBOLIC_LINK_FLAG_DIRECTORY;

0 commit comments

Comments
 (0)