haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
469 stars 280 forks source link

[BUG] seafile-ignore.txt seems not working #1430

Open CepheiSigma opened 1 year ago

CepheiSigma commented 1 year ago

i was added .plugin_symlinks to seafile-ignore.txt,but seafile still index this folder. this folder has recursive symlink and seafile will consume huge memory that will lead os crash

Here is log

FindFirstFile failed \\?\F:\Project\Dart\Whale\movie\windows\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\linux\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\windows\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\windows\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\windows\flutter\ephemeral\.plugin_symlinks\fluter_plugin\example\windows\flutter\ephemeral\.plugin_symlinks\fluter_plugin\libplayer: 1921.

Version

seafile client 8.0.9

feiniks commented 1 year ago

Hi, I don't think you are using seafile-ignore.txt correctly. You can refer to excluding_files or ask on the forum.

CepheiSigma commented 1 year ago

@feiniks that was not a configuration error, i was checked seaf-daemon's source code, before seafile sync repo, do_check_dir_locked will be invoked,but this function was not following the seafile-ignore.txt, because of recursive symlink that should have been ignored has been scaned, this function will enter dead-loop.

feiniks commented 1 year ago

@feiniks that was not a configuration error, i was checked seaf-daemon's source code, before seafile sync repo, do_check_dir_locked will be invoked,but this function was not following the seafile-ignore.txt, because of recursive symlink that should have been ignored has been scaned, this function will enter dead-loop.

Hi, the seafile server does not allow symlinks, so directories with symlinks will not be synced from the server. And do_check_dir_locked will only be called when downloading synchronously, so it will not check a directory containing symlinks. Can you show seafile-ignore.txt?

CepheiSigma commented 1 year ago

@feiniks here is my seafile-ignore.txt

*/node_modules/
*/.idea/
*/.vscode/
*/.gradle/
*/.git/
*/.vs/
*/android/app/build/
*/obj/
*/build/
*/dist/
*/.dart_tool/
*/bin/
*/Go/*/bin/
*/php/*/storage/
*/publish/
*/packages/
*/*.log
*/.rpt2_cache/
*/target/
*/Python/*/venv
.plugin_symlinks/
*/.plugin_symlinks/
*plugin_symlinks*
.plugin_symlinks*
*/.plugin_symlinks*
*/ephemeral/
cmake-*

and this is my folder

F:
  - Project
      - Dart
        - Whale
          - movie
            - windows
              - flutter
                - ephemeral
                  - plugin_symlinks
                    - fluter_plugin -> C:\Users\cephe\Desktop\Workspace\fluter_plugin\ # this folder has same sub-construction in flutter folder
feiniks commented 1 year ago

@feiniks here is my seafile-ignore.txt

*/node_modules/
*/.idea/
*/.vscode/
*/.gradle/
*/.git/
*/.vs/
*/android/app/build/
*/obj/
*/build/
*/dist/
*/.dart_tool/
*/bin/
*/Go/*/bin/
*/php/*/storage/
*/publish/
*/packages/
*/*.log
*/.rpt2_cache/
*/target/
*/Python/*/venv
.plugin_symlinks/
*/.plugin_symlinks/
*plugin_symlinks*
.plugin_symlinks*
*/.plugin_symlinks*
*/ephemeral/
cmake-*

and this is my folder

F:
  - Project
      - Dart
        - Whale
          - movie
            - windows
              - flutter
                - ephemeral
                  - plugin_symlinks
                    - fluter_plugin -> C:\Users\cephe\Desktop\Workspace\fluter_plugin\ # this folder has same sub-construction in flutter folder

Hi, you should follow seafile's ignore rules. Suppose your repo name is flutter, if you wan't to ignore plugin_symlinks folder under the repo, you should write like this in seafile-ignore.txt:ephemeral/plugin_symlinks/ ephemeral/plugin_symlinks/*.

CepheiSigma commented 1 year ago

@feiniks i add Dart/Whale/movie/windows/flutter/ephemeral/.plugin_symlinks/ and Dart/Whale/movie/windows/flutter/ephemeral/.plugin_symlinks/* to seafile-ignore.txt but it was no effect