diff options
-rw-r--r-- | gemfeed.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,6 +1,7 @@ import argparse import datetime import glob +import os import os.path import urllib.parse @@ -13,7 +14,12 @@ def find_files(): index = "index.{}".format(extension) if index in files: files.remove(index) - return files + world_readable = [] + for filename in files: + st = os.stat(filename) + if st.st_mode & stat.S_IROTH: + world_readable.append(filename) + return world_readable def populate_entry_from_file(filename, base_url, entry): url = urljoin(base_url, filename) |