Skip to content

Commit 896dc05

Browse files
Preserve errno before closing files to prevent it from being overwritten
1 parent eb55e5a commit 896dc05

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • contrib/ivorysql_ora/src/builtin_packages/utl_file

contrib/ivorysql_ora/src/builtin_packages/utl_file/utl_file.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,10 @@ ora_utl_file_fcopy(PG_FUNCTION_ARGS)
529529
fclose(dstfile);
530530

531531
if (copy_result)
532+
{
533+
errno = copy_result;
532534
IO_EXCEPTION();
535+
}
533536

534537
PG_RETURN_VOID();
535538
}

0 commit comments

Comments
 (0)