summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-08-30 13:39:24 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-08-30 14:46:53 +0300
commit06242419afc67752d32fabd20ad5b81ff8fd2970 (patch)
treec9a71629c622335c57084eccb5b7ac1e97b4a06e /lib
parent273a025c504774b5dfec2429ca0d5e4f8c73a891 (diff)
downloadrpm-06242419afc67752d32fabd20ad5b81ff8fd2970.tar.gz
rpm-06242419afc67752d32fabd20ad5b81ff8fd2970.tar.bz2
rpm-06242419afc67752d32fabd20ad5b81ff8fd2970.zip
Only backup if osuffix is set
- This can happen on %ghost files, fsm->ossufix is never set for them. Arguably this is a bug in the file disposition calculations but for now...
Diffstat (limited to 'lib')
-rw-r--r--lib/fsm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fsm.c b/lib/fsm.c
index 773261197..7afe0144e 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -1527,7 +1527,8 @@ static int fsmBackup(FSM_t fsm)
{
int rc = 0;
- if (fsm->action == FA_SAVE || fsm->action == FA_BACKUP) {
+ /* FIXME: %ghost can have backup action but no suffix */
+ if ((fsm->action == FA_SAVE || fsm->action == FA_BACKUP) && fsm->osuffix) {
char * opath = fsmFsPath(fsm, S_ISDIR(fsm->sb.st_mode), NULL);
char * path = fsmFsPath(fsm, 0, fsm->osuffix);
rc = fsmRename(opath, path, fsm->mapFlags);