diff --git a/borgmatic/borg/list.py b/borgmatic/borg/list.py index ff9f4c8..c1061e3 100644 --- a/borgmatic/borg/list.py +++ b/borgmatic/borg/list.py @@ -92,6 +92,8 @@ def make_find_paths(find_paths): ['sh:**/*foo.txt*/**', 'pp:root/somedir'] ''' + if not find_paths: + return () return tuple( find_path diff --git a/tests/unit/borg/test_list.py b/tests/unit/borg/test_list.py index 1bc6039..dd85f82 100644 --- a/tests/unit/borg/test_list.py +++ b/tests/unit/borg/test_list.py @@ -258,8 +258,8 @@ def test_make_list_command_includes_additional_flags(argument_name): assert command == ('borg', 'list', '--' + argument_name.replace('_', '-'), 'value', 'repo') -def test_make_find_paths_passes_through_empty_paths(): - assert module.make_find_paths(()) == () +def test_make_find_paths_considers_none_as_empty_paths(): + assert module.make_find_paths(None) == () def test_make_find_paths_passes_through_patterns():