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) {
#ifdef WINDOWS
// don nothing
return 0;
#endif
#ifndef WINDOWS
if (link(src, dst) != 0) {
if (errno == EXDEV || errno == ENOTSUP) {
return -1;
}
return errno;
}
#endif
return 0;
}