소스 검색

fix: handle unicode chars when syncing files using git storage (#5272)

git has the quotopath option enabled by default,
filepaths with unicode characters will be escaped,
causing the wiki to not handle changes.
myml 3 년 전
부모
커밋
986956c8ee
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      server/modules/storage/git/storage.js

+ 4 - 0
server/modules/storage/git/storage.js

@@ -45,6 +45,10 @@ module.exports = {
       await this.git.init()
     }
 
+    // Disable quotePath
+    // Link https://git-scm.com/docs/git-config#Documentation/git-config.txt-corequotePath
+    await this.git.raw(['config', '--local', 'core.quotepath', false])
+
     // Set default author
     await this.git.raw(['config', '--local', 'user.email', this.config.defaultEmail])
     await this.git.raw(['config', '--local', 'user.name', this.config.defaultName])