Commit 8bb336e0 authored by payno's avatar payno
Browse files

add realpath to avoid issues with /mnt/multipath-shares

parent d137fb6e
Pipeline #36085 passed with stage
in 20 seconds
......@@ -844,20 +844,14 @@ class _Acquisition:
# work on absolute path. The conversion to relative path and
# then to absolute path is a trick in case there is some 'mounted'
# directory exposed differently. Like '/mnt/multipath-shares/tmp_14_days'
print('rel path to cwd:', os.path.relpath(input_file_path, os.getcwd()))
input_file_path = os.path.abspath(os.path.relpath(input_file_path, os.getcwd()))
def filter_multipath_share(my_str):
if os.path.exists('/tmp_14_days') and my_str.startswith('/mnt/multipath-shares'):
return my_str.lstrip('/mnt/multipath-shares')
return my_str
input_file_path = filter_multipath_share(input_file_path)
output_file = filter_multipath_share(output_file)
output_file = os.path.abspath(os.path.relpath(output_file, os.getcwd()))
input_file_path = os.path.realpath(input_file_path)
output_file = os.path.realpath(output_file)
print('absolute path:', input_file_path)
print('output_file:', output_file)
output_file = os.path.abspath(os.path.relpath(output_file, os.getcwd()))
for entry in self._registered_entries:
type_ = _get_entry_type(entry, self._scan_titles)
if type_ is AcquisitionStep.INITIALIZATION:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment