From d6d01102fef88ac692461802e09c0b76a52af8d5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 19 Feb 2020 19:53:19 +0530 Subject: [PATCH] diff kitten: Fix directory diffing with removed binary files failing Fixes #2378 --- docs/changelog.rst | 3 +++ kittens/diff/collect.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index fb8ac1f9b..2aa28f77a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -35,6 +35,9 @@ To update |kitty|, :doc:`follow the instructions `. - Fix border/margin/padding sizes not being recalculated on DPI change (:iss:`2346`) +- diff kitten: Fix directory diffing with removed binary files failing + (:iss:`2378`) + - macOS: Fix menubar title not updating on OS Window focus change (:iss:`2350`) - Fix rendering of combining characters with fonts that have glyphs for diff --git a/kittens/diff/collect.py b/kittens/diff/collect.py index f00c31704..329833207 100644 --- a/kittens/diff/collect.py +++ b/kittens/diff/collect.py @@ -134,7 +134,7 @@ def raw_data_for_path(path): def is_image(path): - return mime_type_for_path(path).startswith('image/') + return mime_type_for_path(path).startswith('image/') if path else False @lru_cache(maxsize=1024)