memset(fsm->sufbuf, 0, sizeof(fsm->sufbuf));
if (fsm->goal == FSM_PKGINSTALL) {
- if (ts && rpmtsGetTid(ts) > 0)
+ if (ts && rpmtsGetTid(ts) != -1)
sprintf(fsm->sufbuf, ";%08x", (unsigned)rpmtsGetTid(ts));
}
if (fsm->postpone)
break;
if (fsm->goal == FSM_PKGINSTALL) {
- (void) fsmNext(fsm,
- (S_ISDIR(st->st_mode) ? FSM_RMDIR : FSM_UNLINK));
+ /* XXX only erase if temp fn w suffix is in use */
+ if (fsm->sufbuf[0] != '\0')
+ (void) fsmNext(fsm,
+ (S_ISDIR(st->st_mode) ? FSM_RMDIR : FSM_UNLINK));
#ifdef NOTYET /* XXX remove only dirs just created, not all. */
if (fsm->dnlx)
int32_t rpmtsGetTid(rpmts ts)
{
- int32_t tid = 0;
+ int32_t tid = -1; /* XXX -1 is time(2) error return. */
if (ts != NULL) {
tid = ts->tid;
}
int32_t rpmtsSetTid(rpmts ts, int32_t tid)
{
- int32_t otid = 0;
+ int32_t otid = -1; /* XXX -1 is time(2) error return. */
if (ts != NULL) {
otid = ts->tid;
ts->tid = tid;