Skip to content
  • Nelson Ben's avatar
    gio/gunixmounts.c: Don't use mtime to monitor mounts on /proc/ · c1a31c3a
    Nelson Ben authored
    Fix get_mounts_timestamp() to not use a stat'ed mtime for /proc/ files.
    Instead, use mount_poller_time if /proc/ watch is running, or otherwise
    return a new generated timestamp to always assume mounts-changed, which
    is safer than previous behaviour of always assuming mounts-not-changed
    (as mtime never changes for /proc/ files when queried from the same
    process).
    
    We say it's safer because allows caches depending on:
    
    g_unix_mounts_get(&time_read)
    g_unix_mounts_changed_since()
    
    to drop possibly outdated/duplicated values, as that was the case for the
    GIO mounts cache used in gio/glocalfile.c which provides mount info for
    g_file_query_filesystem_info() call, as described in below referenced bug.
    
    This fix complements related commit bd9e266e
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787731
    c1a31c3a