Skip to content

同步时忽略 .git 文件夹清理空目录 #6626

Closed
@welearner

Description

@welearner

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

该问题是否能够在默认主题(daylight/midnight)下重现? Can the issue be reproduced with the default theme (daylight/midnight)?

  • 我能够在默认主题下重现该问题
    I was able to reproduce the issue with the default theme

描述问题 Describe the problem

为什么同步完成后会删除 .git 目录下的文件,并且提示删除失败
image

期待的结果 Expected result

不删除 .git 目录下的文件并完成同步

截屏或者录屏演示 Screenshot or screen recording presentation

No response

版本环境 Version environment

- Version: v2.5.0
- Operating System: docker
- Browser (if used): chrome

日志文件 Log file

      ___                                   ___           ___           ___
     /  /\        ___           ___        /__/\         /  /\         /__/\
    /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
   /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
  /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
 /__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
 \  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
  \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
   \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
     /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
     \__\/                                 \__\/         \__\/         \__\/
I 2022/11/17 11:20:50 runtime.go:43: kernel is booting:
    * ver [2.5.0]
    * arch [amd64]
    * pid [1]
    * runtime mode [prod]
    * working directory [/opt/siyuan]
    * read only [false]
    * container [docker]
    * database [ver=20220501]
    * workspace directory [/siyuan/workspace/]
I 2022/11/17 11:20:50 serve.go:108: listen port elapsed [2ms]
I 2022/11/17 11:20:50 serve.go:115: kernel [pid=1] is booting [http://127.0.0.1:6806]
I 2022/11/17 11:20:50 sync.go:81: sync before boot
I 2022/11/17 11:20:51 repository.go:519: boot get sync cloud files elapsed [0.61s]
I 2022/11/17 11:20:51 conf.go:610: database size [12 MB], tree/block count [86/3863]
I 2022/11/17 11:20:51 working.go:148: kernel booted
I 2022/11/17 11:21:51 box.go:79: auto stat [trees=86, blocks=3863, dataSize=488 MB, assetsSize=112 MB]
E 2022/11/17 11:21:54 serve.go:315: handle command failed: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
E 2022/11/17 11:23:30 serve.go:315: handle command failed: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
E 2022/11/17 11:27:27 sync.go:462: remove empty dirs failed: remove /siyuan/workspace/data/.git/branches: permission denied
E 2022/11/17 11:27:27 repository.go:598: sync data repo failed: remove /siyuan/workspace/data/.git/branches: permission denied
E 2022/11/17 11:32:10 serve.go:315: handle command failed: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
E 2022/11/17 11:35:35 serve.go:315: handle command failed: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
E 2022/11/17 11:35:51 serve.go:315: handle command failed: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
E 2022/11/17 11:37:56 sync.go:462: remove empty dirs failed: remove /siyuan/workspace/data/.git/branches: permission denied
E 2022/11/17 11:37:56 repository.go:598: sync data repo failed: remove /siyuan/workspace/data/.git/branches: permission denied

更多信息 More information

No response

Activity

changed the title [-]同步完成后弹出失败提示[/-] [+]同步时忽略 .git 文件夹清理空目录[/+] on Nov 17, 2022
self-assigned this
on Nov 17, 2022
added this to the 2.5.1 milestone on Nov 17, 2022
changed the title [-]同步时忽略 .git 文件夹清理空目录[/-] [+]同步时忽略 `.` 开头的文件夹清理空目录[/+] on Nov 17, 2022
changed the title [-]同步时忽略 `.` 开头的文件夹清理空目录[/-] [+]同步时忽略 .git 文件夹清理空目录[/+] on Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@welearner

      Issue actions

        同步时忽略 .git 文件夹清理空目录 · Issue #6626 · siyuan-note/siyuan