From 336e98bb95393b165bc5f13f3b729cbddf1fd554 Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi Date: Mon, 6 May 2019 14:51:52 +0300 Subject: Moved dwFlags declaration to beginning of scope --- src/win32/posix_w32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index 1f681111b..05ac79a16 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -397,12 +397,13 @@ int p_readlink(const char *path, char *buf, size_t bufsiz) int p_symlink(const char *target, const char *path) { git_win32_path target_w, path_w; + DWORD dwFlags; if (git_win32_path_from_utf8(path_w, path) < 0 || git__utf8_to_16(target_w, MAX_PATH, target) < 0) return -1; - DWORD dwFlags = SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE; + dwFlags = SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE; if (GetFileAttributesW(target_w) & FILE_ATTRIBUTE_DIRECTORY) dwFlags |= SYMBOLIC_LINK_FLAG_DIRECTORY; -- cgit v1.2.1