🎨 移动文档更新索引时区分大小写

This commit is contained in:
Liang Ding 2023-02-21 12:37:32 +08:00
parent a91059c280
commit aad58a221f
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -1096,9 +1096,11 @@ func batchUpdateHPath(tx *sql.Tx, boxID, rootID, oldHPath, newHPath string) (err
if err = execStmtTx(tx, stmt, newHPath, boxID, rootID, oldHPath); nil != err {
return
}
stmt = "UPDATE blocks_fts_case_insensitive SET hpath = ? WHERE box = ? AND root_id = ? AND hpath = ?"
if err = execStmtTx(tx, stmt, newHPath, boxID, rootID, oldHPath); nil != err {
return
if !caseSensitive {
stmt = "UPDATE blocks_fts_case_insensitive SET hpath = ? WHERE box = ? AND root_id = ? AND hpath = ?"
if err = execStmtTx(tx, stmt, newHPath, boxID, rootID, oldHPath); nil != err {
return
}
}
ClearCache()
return