Skip to content
Snippets Groups Projects
Commit 88a72cfb authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

FIX: hotfix for problems with the missing --prefix option

parent 2dca9c2e
No related branches found
No related tags found
2 merge requests!53Release 0.1,!46FIX: hotfix for problems with the missing --prefix option
Pipeline #28983 passed
......@@ -1088,6 +1088,8 @@ def crawler_main(crawled_directory_path: str,
if isinstance(elem, db.File):
# correct the file path:
# elem.file = os.path.join(args.path, elem.file)
if prefix is None:
raise RuntimeError("No prefix set. Prefix must be set if files are used.")
if elem.path.startswith(prefix):
elem.path = elem.path[len(prefix):]
elem.file = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment