fsync for file copy

This commit is contained in:
Hongze Cheng 2021-02-01 16:19:22 +08:00
parent 291aaff1c6
commit e353e3b946
1 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,8 @@ int64_t taosCopy(char *from, char *to) {
if (bytes < sizeof(buffer)) break;
}
fsync(fidto);
close(fidfrom);
close(fidto);
return size;