diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-12-02 18:03:52 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-12-02 18:03:52 +0100 |
commit | bfd0b4bf02187b4da6ce0eb7c9a36df5d96ca649 (patch) | |
tree | d52612d17e2310fa8f864dfb840e639ba3c0da1d /src/nautilus-mime-actions.c | |
parent | e6587b86b4c7543a3b0fd20da88d964865106d86 (diff) | |
download | nautilus-bfd0b4bf02187b4da6ce0eb7c9a36df5d96ca649.tar.gz |
directory: assume recent as local
We were assuming trash and native_path as local, but not recent,
which is wrong.
So assume recent as local, with the benefit that we can use it
for mime type polling and remove some dead code now.
Diffstat (limited to 'src/nautilus-mime-actions.c')
-rw-r--r-- | src/nautilus-mime-actions.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c index 07ae9c11d..44c99d8e4 100644 --- a/src/nautilus-mime-actions.c +++ b/src/nautilus-mime-actions.c @@ -250,31 +250,6 @@ nautilus_mime_actions_get_required_file_attributes (void) NAUTILUS_FILE_ATTRIBUTE_LINK_INFO; } -static gboolean -file_has_local_path (NautilusFile *file) -{ - GFile *location; - char *path; - gboolean res; - - - /* Don't only check _is_native, because we want to support - using the fuse path */ - location = nautilus_file_get_location (file); - if (g_file_is_native (location)) { - res = TRUE; - } else { - path = g_file_get_path (location); - - res = path != NULL; - - g_free (path); - } - g_object_unref (location); - - return res; -} - GAppInfo * nautilus_mime_get_default_application_for_file (NautilusFile *file) { @@ -287,7 +262,7 @@ nautilus_mime_get_default_application_for_file (NautilusFile *file) } mime_type = nautilus_file_get_mime_type (file); - app = g_app_info_get_default_for_type (mime_type, !file_has_local_path (file)); + app = g_app_info_get_default_for_type (mime_type, !nautilus_file_is_local (file)); g_free (mime_type); if (app == NULL) { |