Skip to content

Commit 1d5f54c

Browse files
committed
PGPRO-1376: Do not call dir_is_empty() twice, because readdir() may bring different ordering
1 parent be8f3be commit 1d5f54c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/restore.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,6 @@ restore_directories(const char *pg_data_dir, const char *backup_dir)
581581
linked_path, dir_created, link_name);
582582
}
583583

584-
/*
585-
* This check was done in check_tablespace_mapping(). But do
586-
* it again.
587-
*/
588-
if (!dir_is_empty(linked_path))
589-
elog(ERROR, "restore tablespace destination is not empty: \"%s\"",
590-
linked_path);
591-
592584
if (link_sep)
593585
elog(LOG, "create directory \"%s\" and symbolic link \"%.*s\"",
594586
linked_path,

0 commit comments

Comments
 (0)