Skip to content

UploadFilter should evaluate directories, not just files #92

@graebm

Description

@graebm

Currently, the UploadFilter only evaluates files, and the default filter does NOT exclude hidden directories (source).

If a user wanted to exclude files in hidden directories, their filter would have to crawl up the filepath for ANY segment starting with ".". This filter would be run on every single file beneath the directory they didn't want to upload.

A more intuitive experience would be to run the UploadFilter on each directory before recursing into it (user just needs to check if name starts with "."). And if false is returned, don't recurse into the directory at all. This is also far more efficient.

This change will likely require transfer manager to write its own directory walking code (currently uses walkdir), which isn't hard, but just bringing it up

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions