Sync calls count_files / all_files without policies_manager, which causes incorrect local file system scanning

Đang mở
#448 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli

Hướng nghiên cứu

Start in the sync command, where it calls count_files, which in turn calls all_files on the local folder, and check whether the constructed policies_manager is in scope there. Then trace sync_folders to see how the exclusion regexes are applied elsewhere, and pass the same manager through. Done when counting and listing skip excluded paths, so a circular symlink tree like /run no longer makes the scan loop.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

b2 sync calls count_files, which in turn calls all_files on the local folder.
However, it does not pass in the constructed policies_manager. This means it does not apply the regexs to exclude files/folders.

This causes incorrect file counting, and if you're relying on those directory exclusions to keep b2 from indexing problematic areas, can cause the system to do stuff you had been trying to keep it from doing.

In my case, there are certain linux folders which cause b2 to loop (eg there are some circular symlinks in /run).

I don't know the system well enough to say if there are consequences to this, but I did find a simple workaround of essentially piping policies_manager through sync_folders -> count_files -> all_files.

Ngôn ngữ chính
Python
Star
638
Fork
138
Merge trung bình
8 giờ 27 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Backblaze/B2_Command_Line_Tool

Tất cả issue của Backblaze/B2_Command_Line_Tool

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.