pg_regress_stat.diff
application/octet-stream
Filename: pg_regress_stat.diff
Type: application/octet-stream
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/test/regress/pg_regress.c | 1 | 4 |
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 38b2b1e8e1..ed0e3c780d 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -465,8 +465,6 @@ convert_sourcefiles_in(const char *source_subdir, const char *dest_dir, const ch
{
char testtablespace[MAXPGPATH];
char indir[MAXPGPATH];
- struct stat st;
- int ret;
char **name;
char **names;
int count = 0;
@@ -474,8 +472,7 @@ convert_sourcefiles_in(const char *source_subdir, const char *dest_dir, const ch
snprintf(indir, MAXPGPATH, "%s/%s", inputdir, source_subdir);
/* Check that indir actually exists and is a directory */
- ret = stat(indir, &st);
- if (ret != 0 || !S_ISDIR(st.st_mode))
+ if (!directory_exists(indir))
{
/*
* No warning, to avoid noise in tests that do not have these