Skip to content

Commit 6752166

Browse files
committed
urlOpen: Set errno to ENOENT on error
Callers use the errno for error reporting. Currently it is set to ENOENT by accident bubbling up from rpmMkTempFile and rpmioMkpath. As we need to change rpmioMkpath set errno explicitly to keep the errno the same for the callers of urlOpen. Related: #3508
1 parent 7082585 commit 6752166

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rpmio/rpmio.cc

+1
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ static FD_t urlOpen(const char * url, int flags, mode_t mode)
462462
unlink(dest);
463463
} else {
464464
fd = NULL;
465+
errno = ENOENT;
465466
}
466467
dest = _free(dest);
467468

0 commit comments

Comments
 (0)