fix(os): fix error on windows.

This commit is contained in:
Haojun Liao 2024-01-16 10:44:59 +08:00
parent b1c6ba467b
commit 4c119c7626
1 changed files with 2 additions and 4 deletions

View File

@ -1388,15 +1388,13 @@ int32_t taosSetFileHandlesLimit() {
} }
int32_t taosLinkFile(char *src, char *dst) { int32_t taosLinkFile(char *src, char *dst) {
#ifdef WINDOWS #ifndef WINDOWS
// don nothing
return 0;
#endif
if (link(src, dst) != 0) { if (link(src, dst) != 0) {
if (errno == EXDEV || errno == ENOTSUP) { if (errno == EXDEV || errno == ENOTSUP) {
return -1; return -1;
} }
return errno; return errno;
} }
#endif
return 0; return 0;
} }