Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2024-01-20 21:29:32 +08:00
commit 0580fc9f51
2 changed files with 14 additions and 0 deletions

View file

@ -154,6 +154,10 @@ func resetDuplicateBlocksOnFileSys() {
boxPath := filepath.Join(util.DataDir, box.ID)
var duplicatedTrees []*parse.Tree
filepath.Walk(boxPath, func(path string, info os.FileInfo, err error) error {
if nil == info {
return nil
}
if info.IsDir() {
if boxPath == path {
// 跳过根路径(笔记本文件夹)
@ -303,6 +307,10 @@ func fixBlockTreeByFileSys() {
return nil
}
if nil == info {
return nil
}
if info.IsDir() {
if strings.HasPrefix(info.Name(), ".") {
return filepath.SkipDir

View file

@ -212,6 +212,12 @@ func CheckAuth(c *gin.Context) {
c.Next()
return
}
if strings.HasPrefix(c.Request.RequestURI, "/api/sync/performSync") {
if util.ContainerIOS == util.Container || util.ContainerAndroid == util.Container {
c.Next()
return
}
}
}
// 通过 Cookie