Skip to content

Commit b0efb76

Browse files
committed
use portable unlink in delete_walfiles_in_tli()
1 parent 68922f2 commit b0efb76

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/delete.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ delete_walfiles_in_tli(XLogRecPtr keep_lsn, timelineInfo *tlinfo,
933933
}
934934

935935
/* unlink segment */
936-
rc = unlink(wal_file->file.path);
936+
rc = fio_unlink(wal_file->file.path, FIO_BACKUP_HOST);
937937
if (rc < 0)
938938
{
939939
/* Missing file is not considered as error condition */

src/utils/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,7 @@ int fio_unlink(char const* path, fio_location location)
816816
IO_CHECK(fio_write_all(fio_stdout, &hdr, sizeof(hdr)), sizeof(hdr));
817817
IO_CHECK(fio_write_all(fio_stdout, path, path_len), path_len);
818818

819+
// TODO: error is swallowed ?
819820
return 0;
820821
}
821822
else

0 commit comments

Comments
 (0)