# HG changeset patch # User Emmanuel Gil Peyrot # Date 1356024754 -3600 # Node ID 09945ce42e289cff8302a0e12355ee18e7318fdb # Parent 2c81cc41de2d578eed14d259075ee2000e2dfddc Allow multiple base directories. diff --git a/danboorufs.py b/danboorufs.py --- a/danboorufs.py +++ b/danboorufs.py @@ -191,16 +191,17 @@ def main(args): if args[1] == '-n' or args[1] == '--no-symlinks': use_symlinks = False - directory = args[2] + directories = args[2:] else: use_symlinks = True - directory = args[1] + directories = args[1:] filelist = [] start = time() - for (path, _, files) in os.walk(directory): - filelist.extend(os.path.join(path, filename) for filename in files - if filename.endswith('.tags')) + for directory in directories: + for (path, _, files) in os.walk(directory): + filelist.extend(os.path.join(path, filename) for filename in files + if filename.endswith('.tags')) print('[%d] Walk done.' % (time() - start)) FUSE(Danbooru(filelist, os.path.dirname(mountpoint), use_symlinks),