diff --git a/distribusi/distribusi.py b/distribusi/distribusi.py index 6786536..06cc775 100644 --- a/distribusi/distribusi.py +++ b/distribusi/distribusi.py @@ -227,7 +227,7 @@ def distribusify(args, directory): # noqa if args.latest_first: reverse = True - for root, dirs, files in os.walk(directory): + for root, dirs, files in os.walk(directory, followlinks=True): if args.exclude_directory: if args.verbose: @@ -255,6 +255,8 @@ def distribusify(args, directory): # noqa if 'index.html' not in name: full_path = os.path.join(root, name) + #unfold all the symlinks, too + full_path = os.path.realpath(full_path) mime = MIME_TYPE.from_file(full_path) # example: MIME plain/text becomes 'type' plain 'subtype' text type_, subtype = mime.split('/')