summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorgit <svn-admin@ruby-lang.org>2019-08-19 14:34:29 +0900
committergit <svn-admin@ruby-lang.org>2019-08-19 14:34:29 +0900
commit1f3f50fb5eb08ede6cfaf450e0d7db797ec46c95 (patch)
treecb96fec2f8ea0fc420a0aceb955771517cf11fe3 /win32
parent574a9edfb3c20165c919d447902d1052165b2132 (diff)
* expand tabs. [ci skip]
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 784f909..fe5058a 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5207,12 +5207,12 @@ w32_symlink(UINT cp, const char *src, const char *link)
}
if (!*link) {
- errno = ENOENT;
- return -1;
+ errno = ENOENT;
+ return -1;
}
if (!*src) {
- errno = EINVAL;
- return -1;
+ errno = EINVAL;
+ return -1;
}
len1 = MultiByteToWideChar(cp, 0, src, -1, NULL, 0);
len2 = MultiByteToWideChar(cp, 0, link, -1, NULL, 0);
@@ -5227,12 +5227,12 @@ w32_symlink(UINT cp, const char *src, const char *link)
flag = SYMBOLIC_LINK_FLAG_DIRECTORY;
ret = create_symbolic_link(wlink, wsrc, flag |= create_flag);
if (!ret &&
- (e = GetLastError()) == ERROR_INVALID_PARAMETER &&
- (flag & SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE)) {
- create_flag = 0;
- flag &= ~SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
- ret = create_symbolic_link(wlink, wsrc, flag);
- if (!ret) e = GetLastError();
+ (e = GetLastError()) == ERROR_INVALID_PARAMETER &&
+ (flag & SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE)) {
+ create_flag = 0;
+ flag &= ~SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
+ ret = create_symbolic_link(wlink, wsrc, flag);
+ if (!ret) e = GetLastError();
}
ALLOCV_END(buf);