Skip to content

Commit 90fbf29

Browse files
authored
Merge pull request #140 from fosslight/temp
Bug fix of same folder name in lint and add
2 parents 9d68f01 + 420897e commit 90fbf29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fosslight_prechecker/_precheck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,13 @@ def precheck_for_project(path_to_find):
246246
missing_license = [str(sub) for sub in set(report.files_without_licenses)]
247247
if not path_to_find.endswith(f"{os.sep}"):
248248
path_to_find += f"{os.sep}"
249-
missing_license = [sub.replace(path_to_find, '') for sub in missing_license]
249+
missing_license = [sub.replace(path_to_find, '', 1) for sub in missing_license]
250250

251251
# File list that missing copyright text
252252
missing_copyright = [str(sub) for sub in set(report.files_without_copyright)]
253253
if not path_to_find.endswith(f"{os.sep}"):
254254
path_to_find += f"{os.sep}"
255-
missing_copyright = [sub.replace(path_to_find, '') for sub in missing_copyright]
255+
missing_copyright = [sub.replace(path_to_find, '', 1) for sub in missing_copyright]
256256
except Exception as ex:
257257
dump_error_msg(f"Error prechecker lint: {ex}", True)
258258

0 commit comments

Comments
 (0)