Backup filename needs suffix, whether its directory or not
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 23 Aug 2012 09:44:33 +0000 (12:44 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 23 Aug 2012 09:44:33 +0000 (12:44 +0300)
lib/fsm.c

index 3b356f5..f66e94c 100644 (file)
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -1533,7 +1533,7 @@ static int fsmBackup(FSM_t fsm)
     {
        int isDir = S_ISDIR(st->st_mode);
         char * opath = fsmFsPath(fsm, isDir, NULL);
-        char * path = fsmFsPath(fsm, isDir, fsm->osuffix);
+        char * path = fsmFsPath(fsm, 0, fsm->osuffix);
         rc = fsmRename(opath, path, fsm->mapFlags);
         if (!rc) {
             rpmlog(RPMLOG_WARNING, _("%s saved as %s\n"), opath, path);