Jelajahi Sumber

Fixed bug caused by gogs update

Ivan Arkhipov 3 tahun lalu
induk
melakukan
3ff88cf312
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  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)