Skip to content

Commit

Permalink
fix(Core): br
Browse files Browse the repository at this point in the history
br
  • Loading branch information
snomiao committed Jul 30, 2023
1 parent d2dfc10 commit bff06d5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Core/CapslockX-Config.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CapsLockX_ConfigSet(field, varName, setValue, comment := "")
global CapsLockX_ConfigChangedTickCount
CapsLockX_ConfigChangedTickCount := A_TickCount
content := setValue

ConfigLock()
; 不对配置自动重新排序
if (comment) {
Expand All @@ -82,7 +82,7 @@ CapsLockX_Config(field, varName, defaultValue, comment := "")
global CapsLockX_ConfigChangedTickCount
CapsLockX_ConfigChangedTickCount := A_TickCount
IniRead, content, %CapsLockX_配置路径%, %field%, %varName%, %defaultValue%

ConfigLock(field varName)
; 对配置自动重新排序
if (comment) {
Expand All @@ -97,24 +97,24 @@ CapsLockX_Config(field, varName, defaultValue, comment := "")

清洗为_UTF16_WITH_BOM_型编码(path){
ConfigLock("UTF16_WITH_BOM 文件编码清洗:" path)

FileEncoding, UTF-8
FileRead content, %path%
FileDelete %path%
FileAppend %content%, %path%, UTF-16
FileRead content, %path%

ConfigUnlock()
}

清洗为_UTF8_WITH_BOM_型编码(path){
ConfigLock("UTF8_WITH_BOM 文件编码清洗:" path)

FileEncoding UTF-8
FileRead content, %path%
FileDelete %path%
FileAppend %content%, %path%, UTF-8

ConfigUnlock()
}

Expand All @@ -134,7 +134,7 @@ ConfigLock(名义:="")
Sleep, 1000
}
CapsLockX_DontReload := 1

FileAppend %名义%, % CapsLockX_配置路径 ".lock"
return True
}
Expand All @@ -143,4 +143,4 @@ ConfigUnlock()
FileDelete % CapsLockX_配置路径 ".lock"
CapsLockX_DontReload := 0
return True
}
}

0 comments on commit bff06d5

Please sign in to comment.