Changeset - c5bed2ab87a7
[Not reviewed]
stable
0 1 0
Mads Kiilerich (mads) - 13 months ago 2025-02-18 13:02:17
mads@kiilerich.com
Grafted from: 98693b531d90
vcs: Always return node content as bytes

is_binary would fail to find nul bytes in unicode strings.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/nodes.py
Show inline comments
 
@@ -265,12 +265,14 @@ class FileNode(Node):
 
        Returns lazily byte content of the FileNode.
 
        """
 
        if self.changeset:
 
            content = self.changeset.get_file_content(self.path)
 
        else:
 
            content = self._content
 
        if content is not None:
 
            content = safe_bytes(content)
 
        return content
 

	
 
    @LazyProperty
 
    def size(self):
 
        if self.changeset:
 
            return self.changeset.get_file_size(self.path)
0 comments (0 inline, 0 general)