added followsymlink
This commit is contained in:
parent
2df1976407
commit
a59d6d1fc1
1 changed files with 3 additions and 1 deletions
|
|
@ -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('/')
|
||||
|
|
|
|||
Loading…
Reference in a new issue