Skip to content

Commit ea44f50

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 345241c commit ea44f50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cyclonedx_py/_internal/utils/pep639.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
from base64 import b64encode
2525
from collections.abc import Generator
2626
from os.path import dirname, join
27+
from pathlib import Path, PurePosixPath
2728
from typing import TYPE_CHECKING, Any, AnyStr
28-
from pathlib import PurePosixPath, Path
2929

3030
from cyclonedx.model import AttachedText, Encoding
3131
from cyclonedx.model.license import DisjunctiveLicense, LicenseAcknowledgement
@@ -69,7 +69,7 @@ def project2licenses(project: dict[str, Any], lfac: 'LicenseFactory',
6969
continue
7070
with plicense_fileh:
7171
content = plicense_fileh.read()
72-
yield _make_license_from_content('/'.join(Path(plfile).parts), content, lack)
72+
yield _make_license_from_content(plfile, content, lack)
7373
# Silently skip any other types (including string/PEP 621)
7474
return None
7575

@@ -125,7 +125,7 @@ def _make_license_from_content(file_name: str, content: AnyStr, lack: 'LicenseAc
125125
else content.encode('utf-8')
126126
).decode('ascii')
127127
return DisjunctiveLicense(
128-
name=f'{lack.value} license file: {file_name}',
128+
name=f'{lack.value} license file: {'/'.join(Path(file_name).parts)}',
129129
acknowledgement=lack,
130130
text=AttachedText(
131131
content=content_s,

0 commit comments

Comments
 (0)