mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
move instead copy
This commit is contained in:
parent
1c0fa345ac
commit
648fa52583
@ -322,6 +322,8 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 != munmap(output, le64toh(file_info.uncompressed_size)))
|
||||
perror("munmap");
|
||||
if (0 != fsync(output_fd))
|
||||
perror("fsync");
|
||||
if (0 != close(output_fd))
|
||||
@ -528,10 +530,10 @@ int main(int/* argc*/, char* argv[])
|
||||
(void)snprintf(decompressed_name, decompressed_name_len + 1, decompressed_name_fmt, self, decompressed_suffix);
|
||||
|
||||
std::error_code ec;
|
||||
std::filesystem::copy_file(static_cast<char *>(decompressed_name), static_cast<char *>(self), ec);
|
||||
if (ec)
|
||||
|
||||
if (link(decompressed_name, self))
|
||||
{
|
||||
std::cerr << ec.message() << std::endl;
|
||||
perror("link");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user