From 776cc7cf682959c684cd2f0ee0c9044bee3dac76 Mon Sep 17 00:00:00 2001 From: Christian Hitz Date: Thu, 29 Aug 2013 10:03:56 +0200 Subject: fix handling of broken symlinks if a symlink has a length of self.magiclen git-fat would crash because it could not read the file --- git-fat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git-fat') diff --git a/git-fat b/git-fat index 4455600..e62f99b 100755 --- a/git-fat +++ b/git-fat @@ -194,7 +194,10 @@ class GitFat(object): if stat.st_size != self.magiclen: return False, None # read file - digest, bytes = self.decode_stream(open(fname)) + try: + digest, bytes = self.decode_stream(open(fname)) + except IOError: + return False, None if isinstance(digest, str): return digest, bytes else: -- cgit v1.2.1