diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2017-07-30 11:20:29 +0100 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2017-08-07 13:49:53 +0300 |
commit | d1876bd6fb7a5e62be0f6f8b5baf743024cfd1c7 (patch) | |
tree | e91e0f08f03dc821137622bb1a25d0c3dd166aa3 | |
parent | 57ee2b8ee3b0fb1313c9affded92ac13927973ac (diff) | |
download | nautilus-d1876bd6fb7a5e62be0f6f8b5baf743024cfd1c7.tar.gz |
file: clear info before removing from directory
When marking the file as gone, clearing its file info after removing it
from the parent directory will result in a crash in cases where it is
the last reference being dropped.
https://bugzilla.gnome.org/show_bug.cgi?id=785562
-rw-r--r-- | src/nautilus-file.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c index 0b35f6276..8758958f0 100644 --- a/src/nautilus-file.c +++ b/src/nautilus-file.c @@ -8448,6 +8448,11 @@ nautilus_file_mark_gone (NautilusFile *file) /* Drop it from the symlink hash ! */ remove_from_link_hash_table (file); + /* Removing the file from the directory can result in dropping the last + * reference, and so clearing the info then will result in a crash. + */ + nautilus_file_clear_info (file); + /* Let the directory know it's gone. */ directory = file->details->directory; if (!nautilus_file_is_self_owned (file)) @@ -8455,8 +8460,6 @@ nautilus_file_mark_gone (NautilusFile *file) nautilus_directory_remove_file (directory, file); } - nautilus_file_clear_info (file); - /* FIXME bugzilla.gnome.org 42429: * Maybe we can get rid of the name too eventually, but * for now that would probably require too many if statements |