Skip to content

Commit 205f837

Browse files
committed
updated to skip symlinks
1 parent 6e246db commit 205f837

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/add_cc4_links.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# You should have received a copy of the GNU General Public License
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
import re, sys
17+
import os.path, re, sys
1818
from pathlib import Path
1919

2020
class AddCC4Links(object):
@@ -66,7 +66,8 @@ def get_path(self):
6666
def get_files(self):
6767
"""Get all the 4.0 files *except* those we are linking to"""
6868
self.files = [f for f in self.path.glob('*_4.0*.html')
69-
if not f.match(self.exclude_pattern)]
69+
if (not os.path.islink(f) and
70+
not f.match(self.exclude_pattern))]
7071
self.files.sort()
7172

7273
def process_files(self):

0 commit comments

Comments
 (0)