Skip to content

Improve filter function for restore #223

@fd0

Description

@fd0

In #218 we discussed the limitations of the currently used function filepath.Match for selecting files that should be restored. This filter is based on the shell globbing (e.g. *.go) and only applies to the file name, it doesn't handle separator chars (/) at all.

This issue should track the progress on improving the filters on what is restored. I'm thinking about something like zsh globbing, so that users can easily do the following:

  • Filter /foo/*/*.go restores all files ending with .go from any subdirs of foo in the backup
  • Filter **/*.go restores all .go files from all dirs in the backup

etc. Any other thoughts on these filter expressions?

We could just use a regex, but that feels like overkill for me.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions