Skip to content

Commit 632e576

Browse files
authored
archive.py: fix handling of special file types (#1344)
1 parent cfd73c6 commit 632e576

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cmscommon/archive.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ def namelist(self):
183183
names = []
184184
for path, _, filenames in os.walk(self.temp_dir):
185185
for filename in filenames:
186-
names.append(os.path.relpath(os.path.join(path, filename),
187-
self.temp_dir))
186+
filepath = os.path.join(path, filename)
187+
if os.path.islink(filepath) or not os.path.isfile(filepath):
188+
continue
189+
names.append(os.path.relpath(filepath, self.temp_dir))
188190
return names
189191

190192
def read(self, file_path):

0 commit comments

Comments
 (0)