Skip to content

Commit

Permalink
fix: Update verify-spdx-headers to move get size after symlinks
Browse files Browse the repository at this point in the history
fix: The getsize should happen after symlink check as symlinks will fail to be found. 

Signed-off-by: Sterling Taylor <[email protected]>
  • Loading branch information
staylorTT authored Aug 8, 2024
1 parent a5f49a6 commit 0496add
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions verify-spdx-headers
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,12 @@ class Index:
for file in files:
path = os.path.join(root, file)

# If the file is empty skip.
if os.path.getsize(path) == 0:
continue

# If the file is a symlink, don't bother
if os.path.islink( path ):
continue
# If the file is empty skip.
if os.path.getsize(path) == 0:
continue
# Find the language of the file.
language = self.language(path)
if language is None:
Expand Down

0 comments on commit 0496add

Please sign in to comment.