Hi Reiner!

Thank you for reviewing patch. I have made all the changes you
mentioned above. Please find an attachment :-)

Cheers,
Satyam Zode
From 2e440a527e4689a6f4321695801b5cd04ff8642a Mon Sep 17 00:00:00 2001
From: Satyam Zode <satyamz...@gmail.com>
Date: Thu, 7 Apr 2016 00:31:42 +0530
Subject: [PATCH 1/2] Fixed issue related to diffoscope symlinks crashing

---
 diffoscope/comparators/binary.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/diffoscope/comparators/binary.py b/diffoscope/comparators/binary.py
index 9663214..2b61538 100644
--- a/diffoscope/comparators/binary.py
+++ b/diffoscope/comparators/binary.py
@@ -182,8 +182,8 @@ class File(object, metaclass=ABCMeta):
     def has_same_content_as(self, other):
         logger.debug('%s has_same_content %s', self, other)
         # try comparing small files directly first
-        my_size = os.path.getsize(self.path)
-        other_size = os.path.getsize(other.path)
+        my_size = os.lstat(self.path).st_size
+        other_size = os.lstat(other.path).st_size
         if my_size == other_size and my_size <= SMALL_FILE_THRESHOLD:
             if open(self.path, 'rb').read() == open(other.path, 'rb').read():
                 return True
-- 
2.1.4

Reply via email to