Skip to content

Commit

Permalink
Print full path if file removal fails
Browse files Browse the repository at this point in the history
For normal debug output the basename of the files are sufficient as when
debugging is enabled the directories are also printed. But here the
warning is given without a debug flag so we need the full context right
there.
  • Loading branch information
ffesti committed Dec 11, 2023
1 parent f4ad03d commit f1503ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,9 +1174,9 @@ int rpmPackageFilesRemove(rpmts ts, rpmte te, rpmfiles files,

if (rc) {
int lvl = strict_erasures ? RPMLOG_ERR : RPMLOG_WARNING;
rpmlog(lvl, _("%s %s: remove failed: %s\n"),
rpmlog(lvl, _("%s %s%s: remove failed: %s\n"),
S_ISDIR(fp->sb.st_mode) ? _("directory") : _("file"),
fp->fpath, strerror(errno));
rpmfiDN(fi), fp->fpath, strerror(errno));
}
}

Expand Down

0 comments on commit f1503ab

Please sign in to comment.