Use existing config inputs as is instead of globbing them
Paths containing glob characters, such as 'Photos [2020]', matched nothing and were skipped.
This commit is contained in:
@@ -881,13 +881,16 @@ def _expand_inputs(inputs: list[str], user: str | None = None) -> list[str]:
|
||||
continue
|
||||
|
||||
if user is not None:
|
||||
i_ex = glob(_expand_home(i, user))
|
||||
path = _expand_home(i, user)
|
||||
else:
|
||||
i_ex = glob(i)
|
||||
path = i
|
||||
|
||||
if i.startswith('~'):
|
||||
logger.warning('Cannot expand \'~\'. No user specified')
|
||||
|
||||
# An existing path is used as is, so names with glob characters (e.g. 'Photos [2020]') still work
|
||||
i_ex = [path] if os.path.lexists(path) else glob(path)
|
||||
|
||||
if len(i_ex) == 0:
|
||||
logger.warning(
|
||||
'No file or directory matching input %s. Skipping...', i)
|
||||
|
||||
Reference in New Issue
Block a user