Eliminate a very bogus early return from rpmPackageFilesInstall()

- This might've been somewhat less incorrect in earlier incarnations
  of the fsm, but now its just totally totally wrong as it would leak
  resources left and right. In reality this never happens as
  on install, regular files are assumed non-existent always (as we're
  installing to temporary path) from fsmInit() so fsmVerify()
  is guaranteed to return CPIOERR_ENOENT here.
This commit is contained in:
Panu Matilainen 2013-02-18 14:56:02 +02:00
parent 11ba21e2ab
commit f5957308d4
1 changed files with 3 additions and 2 deletions

View File

@ -1692,8 +1692,9 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfi fi, FD_t cfd,
if (!fsm->postpone) {
if (S_ISREG(st->st_mode)) {
rc = fsmVerify(fsm);
if (!(rc == CPIOERR_ENOENT)) return rc;
rc = expandRegular(fsm, psm, archive, nodigest);
if (rc == CPIOERR_ENOENT) {
rc = expandRegular(fsm, psm, archive, nodigest);
}
} else if (S_ISDIR(st->st_mode)) {
/* Directories replacing something need early backup */
rc = fsmBackup(fsm);