We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5ea3d72 + 796503c commit e7d67a3Copy full SHA for e7d67a3
src/fosslight_source/_scan_item.py
@@ -151,10 +151,13 @@ def is_manifest_file(file_path: str) -> bool:
151
152
153
def is_package_dir(dir_path: str) -> bool:
154
- path_parts = dir_path.split(os.path.sep)
+ # scancode and scanoss use '/' as path separator regardless of OS
155
+ dir_path = dir_path.replace('\\', '/')
156
+ path_parts = dir_path.split('/')
157
+
158
for pkg_dir in _package_directory:
159
if pkg_dir in path_parts:
160
pkg_index = path_parts.index(pkg_dir)
- pkg_path = os.path.sep.join(path_parts[:pkg_index + 1])
161
+ pkg_path = '/'.join(path_parts[:pkg_index + 1])
162
return True, pkg_path
163
return False, ""
0 commit comments