tibbs / pagure

Forked from pagure 7 years ago
Clone

da77985 Fix displaying binary files in the documentation

Authored and Committed by pingou 7 years ago
    Fix displaying binary files in the documentation
    
    This was caused by a change to __get_tree_and_content which tries to
    convert the file and for this tries to guess the encoding. Of course
    for binary files (such as images) this fails and we were ending up
    with a 500 error.
    
    With this change, we first check if the file is a binary and if it is
    we just display it as such without trying to convert it.
    
        
file modified
+7 -1