diff options
Diffstat (limited to 'src/backend/storage/file/copydir.c')
-rw-r--r-- | src/backend/storage/file/copydir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/storage/file/copydir.c b/src/backend/storage/file/copydir.c index 1f766d20d19..342d078a8ff 100644 --- a/src/backend/storage/file/copydir.c +++ b/src/backend/storage/file/copydir.c @@ -218,7 +218,10 @@ copy_file(char *fromfile, char *tofile) (errcode_for_file_access(), errmsg("could not close file \"%s\": %m", tofile))); - CloseTransientFile(srcfd); + if (CloseTransientFile(srcfd)) + ereport(ERROR, + (errcode_for_file_access(), + errmsg("could not close file \"%s\": %m", fromfile))); pfree(buffer); } |