Skip to content
  • Colin Walters's avatar
    g_file_copy(): Clean up logic for info query · 02aaef5a
    Colin Walters authored
    Previously, we called g_file_query_info() *again* on the source at the
    very end of the copy.  This has the lame semantics that if the source
    happened to be deleted, we would fail to apply attributes to the
    destination.  This could even be a security flaw.
    
    This commit changes things so that we query info from the source
    *stream* after opening - i.e. on Unix we use the proper fstat() and
    friends.  That way we operate more atomically.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699959
    02aaef5a