Skip to content

Commit

Permalink
Rename get escaped path method
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgarbar committed Jul 21, 2024
1 parent 55d1e72 commit 3d3e9b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ch_backup/backup/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def get_udf_create_statement(
"""
Download user defined function create statement.
"""
remote_path = self._try_get_escaped_path(
remote_path = self._get_escaped_if_exists(
_udf_data_path, backup_meta.path, filename
)
return self._storage_loader.download_data(remote_path, encryption=True)
Expand Down Expand Up @@ -421,7 +421,7 @@ def download_data_part(

os.makedirs(fs_part_path, exist_ok=True)

remote_dir_path = self._try_get_escaped_path(
remote_dir_path = self._get_escaped_if_exists(
_part_path,
part.link or backup_meta.path,
part.database,
Expand Down Expand Up @@ -463,7 +463,7 @@ def check_data_part(self, backup_path: str, part: PartMetadata) -> bool:
Check availability of part data in storage.
"""
try:
remote_dir_path = self._try_get_escaped_path(
remote_dir_path = self._get_escaped_if_exists(
_part_path,
part.link or backup_path,
part.database,
Expand Down Expand Up @@ -553,7 +553,7 @@ def delete_data_parts(

deleting_files: List[str] = []
for part in parts:
part_path = self._try_get_escaped_path(
part_path = self._get_escaped_if_exists(
_part_path,
part.link or backup_meta.path,
part.database,
Expand Down Expand Up @@ -612,7 +612,7 @@ def _target_part_size(self, part: PartMetadata) -> int:
tar_size, self._encryption_chunk_size, self._encryption_metadata_size
)

def _try_get_escaped_path(
def _get_escaped_if_exists(
self, path_function: Callable, *args: Any, **kwargs: Any
) -> str:
"""
Expand Down

0 comments on commit 3d3e9b6

Please sign in to comment.