diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-08-30 13:39:24 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-08-30 14:46:53 +0300 |
commit | 06242419afc67752d32fabd20ad5b81ff8fd2970 (patch) | |
tree | c9a71629c622335c57084eccb5b7ac1e97b4a06e /lib | |
parent | 273a025c504774b5dfec2429ca0d5e4f8c73a891 (diff) | |
download | rpm-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |