Commit f167416d authored by Kai Willadsen's avatar Kai Willadsen

melddoc: Assume that unknown content types are text

This seems wild... and it kind of is... but it also removes a
platform-specific check and handles situations like e.g., opening an
unsaved buffer.
parent 658170e4
......@@ -146,8 +146,9 @@ class MeldDoc(LabeledObjectMixin, GObject.GObject):
elif file_type == Gio.FileType.REGULAR:
content_type = info.get_content_type()
# FIXME: Content types are broken on Windows with current gio
if Gio.content_type_is_a(content_type, "text/plain") or \
sys.platform == "win32":
# If we can't access a content type, assume it's text.
if not content_type or Gio.content_type_is_a(
content_type, "text/plain"):
if settings.get_boolean('use-system-editor'):
gfile = Gio.File.new_for_path(path)
if sys.platform == "win32":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment