mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Update src/Backups/BackupIO_Disk.cpp
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
This commit is contained in:
parent
e865959ccc
commit
571778ad25
@ -100,12 +100,11 @@ bool BackupWriterDisk::supportNativeCopy(DataSourceDescription data_source_descr
|
||||
|
||||
void BackupWriterDisk::copyFileNative(std::shared_ptr<IDisk> from_disk, const String & file_name_from, const String & file_name_to)
|
||||
{
|
||||
if (!from_disk)
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot natively copy data to disk without source disk");
|
||||
auto file_path = path / file_name_to;
|
||||
disk->createDirectories(file_path.parent_path());
|
||||
if (from_disk)
|
||||
from_disk->copyFile(file_name_from, *disk, file_path);
|
||||
else
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot natively copy data to disk without source disk");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user