Ticket #4147: mc-fix-timer-unsigned-error.patch

File mc-fix-timer-unsigned-error.patch, 801 bytes (added by nvwarr, 21 months ago)

Patch to fix the bug

  • lib/vfs/gc.c

    diff --git a/lib/vfs/gc.c b/lib/vfs/gc.c
    index 5090aaacb..411ffe56f 100644
    a b vfs_expire (gboolean now) 
    249249    locked = TRUE; 
    250250 
    251251    curr_time = mc_timer_elapsed (mc_global.timer); 
    252     exp_time = curr_time - vfs_timeout * G_USEC_PER_SEC; 
     252    exp_time = curr_time; 
    253253 
    254254    if (now) 
    255255    { 
    vfs_expire (gboolean now) 
    269269                stamping->v->free (stamping->id); 
    270270            MC_PTR_FREE (stamp->data); 
    271271        } 
    272         else if (stamping->time <= exp_time) 
     272        else if (stamping->time + vfs_timeout * G_USEC_PER_SEC <= exp_time) 
    273273        { 
    274274            /* update timestamp of VFS that is in use, or free unused VFS */ 
    275275            if (stamping->v->nothingisopen != NULL && !stamping->v->nothingisopen (stamping->id))