瀏覽代碼

Fixed bug caused by gogs update

Ivan Arkhipov 3 年之前
父節點
當前提交
da1f8fa771
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      internal/tool/tool.go

+ 3 - 3
internal/tool/tool.go

@@ -45,9 +45,9 @@ func DetectEncoding(content []byte) (string, error) {
 		return "UTF-8", err
 	}
 
-	if result.Charset != "UTF-8" && len(setting.Repository.AnsiCharset) > 0 {
-		log.Trace("Using default AnsiCharset: %s", setting.Repository.AnsiCharset)
-		return setting.Repository.AnsiCharset, err
+	if result.Charset != "UTF-8" && len(conf.Repository.ANSICharset) > 0 {
+		log.Trace("Using default ANSICharset: %s", conf.Repository.ANSICharset)
+		return conf.Repository.ANSICharset, err
 	}
 
 	log.Trace("Detected encoding: %s", result.Charset)