mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
comments added
This commit is contained in:
parent
47d5a64f13
commit
088a969500
@ -287,6 +287,7 @@ int compressFiles(const char* out_name, const char* exec, char* filenames[], int
|
||||
size_t nlen = strlen(names[i]) + 1;
|
||||
files_data[i].name_length = htole64(nlen);
|
||||
sum_file_size += nlen;
|
||||
/// if no --exec is specified nor it's empty - file which is matching output name is executable
|
||||
if (!is_exec && !exec && strcmp(names[i], out_name) == 0)
|
||||
files_data[i].exec = true;
|
||||
|
||||
|
@ -226,6 +226,7 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress
|
||||
file_info = *reinterpret_cast<FileData*>(input + files_pointer);
|
||||
files_pointer += sizeof(FileData);
|
||||
|
||||
/// for output filename matching compressed allow additional 13 + 7 symbols for ".decompressed.XXXXXX" suffix
|
||||
size_t file_name_len = file_info.exec ? strlen(name) + 13 + 7 + 1 : le64toh(file_info.name_length);
|
||||
|
||||
size_t file_path_len = path ? strlen(path) + 1 + file_name_len : file_name_len;
|
||||
|
Loading…
Reference in New Issue
Block a user