Skip to content

Commit d6f1cde

Browse files
committed
pg_basebackup: Clean up some bogus file extension tests.
Justin Pryzby Discussion: http://postgr.es/m/20220311162911.GM28503@telsasoft.com
1 parent b2de45f commit d6f1cde

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,17 +1224,17 @@ CreateBackupStreamer(char *archive_name, char *spclocation,
12241224
is_tar = (archive_name_len > 4 &&
12251225
strcmp(archive_name + archive_name_len - 4, ".tar") == 0);
12261226

1227-
/* Is this a gzip archive? */
1228-
is_tar_gz = (archive_name_len > 8 &&
1229-
strcmp(archive_name + archive_name_len - 3, ".gz") == 0);
1227+
/* Is this a .tar.gz archive? */
1228+
is_tar_gz = (archive_name_len > 7 &&
1229+
strcmp(archive_name + archive_name_len - 7, ".tar.gz") == 0);
12301230

1231-
/* Is this a LZ4 archive? */
1231+
/* Is this a .tar.lz4 archive? */
12321232
is_tar_lz4 = (archive_name_len > 8 &&
1233-
strcmp(archive_name + archive_name_len - 4, ".lz4") == 0);
1233+
strcmp(archive_name + archive_name_len - 8, ".tar.lz4") == 0);
12341234

1235-
/* Is this a ZSTD archive? */
1235+
/* Is this a .tar.zst archive? */
12361236
is_tar_zstd = (archive_name_len > 8 &&
1237-
strcmp(archive_name + archive_name_len - 4, ".zst") == 0);
1237+
strcmp(archive_name + archive_name_len - 8, ".tar.zst") == 0);
12381238

12391239
/* Is this any kind of compressed tar? */
12401240
is_compressed_tar = is_tar_gz || is_tar_lz4 || is_tar_zstd;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy