From 3c7b655db3685bf5d4b51cccef8afc6d07d3e7eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Mon, 27 Mar 2023 21:06:27 +0200
Subject: [PATCH] FIX: add remove prefix as arg

---
 src/caoscrawler/crawl.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index d0175b38..caff4584 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -1035,7 +1035,7 @@ def _treat_deprecated_prefix(prefix, remove_prefix):
     return remove_prefix
 
 
-def _fix_file_paths(crawled_data):
+def _fix_file_paths(crawled_data, remove_prefix):
     for elem in crawled_data:
         if isinstance(elem, db.File):
             # correct the file path:
@@ -1148,7 +1148,7 @@ def crawler_main(crawled_directory_path: str,
         debug_tree = DebugTree()
         crawled_data = scan_directory(
             crawled_directory_path, cfood_file_name, restricted_path, debug_tree=debug_tree)
-        _fix_file_paths(crawled_data)
+        _fix_file_paths(crawled_data, remove_prefix)
         _check_record_types(crawled_data)
 
         if provenance_file is not None and debug:
-- 
GitLab