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

Ouverte
#448 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
python
Domaine
cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Python
Étoiles
638
Forks
138
Merge moyen
8 h 27 min
PR mergées (30 j)
8

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Backblaze/B2_Command_Line_Tool

Toutes les issues de Backblaze/B2_Command_Line_Tool

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.