On my Ubuntu system, beet import does not recurse into subdirectories containing a tilde ~ character.
$ mkdir 'bar~'
$ touch 'bar~/song.mp3'
$ tree
.
└── bar~
└── song.mp3
1 directory, 1 file
$ beet import .
No files imported from /home/curtis/test
$ mv 'bar~' bar
$ beet import .
unreadable file: /home/curtis/test/bar/song.mp3
No files imported from /home/curtis/test
My configuration (output of beet config) is:
{}
Indeed; *~ is in the default ignore configuration:
https://beets.readthedocs.io/en/stable/reference/config.html#ignore
@sampsyo Ah, thanks! Then in that case, it would have helped me to see that when I ran beet -vv import. Turning on that extra-verbose logging still didn't give any hints as to why such directories were being skipped. What would you think about a patch like:
diff --git a/beets/util/__init__.py b/beets/util/__init__.py
index bb84aedc..7b78cf26 100644
--- a/beets/util/__init__.py
+++ b/beets/util/__init__.py
@@ -197,6 +197,9 @@ def sorted_walk(path, ignore=(), ignore_hidden=False, logger=None):
skip = False
for pat in ignore:
if fnmatch.fnmatch(base, pat):
+ logger.debug(u'ignoring {0} due to ignore rule {1}'.format(
+ base, pat
+ ))
skip = True
break
if skip:
?
Yeah, sounds good!
Most helpful comment
@sampsyo Ah, thanks! Then in that case, it would have helped me to see that when I ran
beet -vv import. Turning on that extra-verbose logging still didn't give any hints as to why such directories were being skipped. What would you think about a patch like:?