Skip to content

Commit 628eeca

Browse files
author
coresoftware dev
committed
python 3.8 backward compatibility change. Update folder hashing file filter
1 parent 21def1b commit 628eeca

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/scanoss/file_filters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
'license.txt',
4545
'license.md',
4646
'copying.lib',
47-
'makefile',
4847
}
4948

5049
DEFAULT_SKIPPED_FILES_HFH = {

src/scanoss/scanners/folder_hasher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def _hash_calc(self, node: DirectoryNode) -> dict:
249249
ext_without_dot = extension[1:]
250250
extension_map[ext_without_dot] = extension_map.get(ext_without_dot, 0) + 1
251251

252-
current_directory.removeprefix(self.scan_dir)
252+
current_directory.replace(self.scan_dir, '', 1).lstrip(os.path.sep)
253253
parts = current_directory.split(os.path.sep)
254254
for d in parts:
255255
if d in {'', '.', '..'}:

0 commit comments

Comments
 (0)