Skip to content
Commit 39146d8d authored by Vincent Donnefort's avatar Vincent Donnefort Committed by Douglas Raillard
Browse files

lisa.wa: Fix common prefix for wa_path

When filling wa_path, WAOutput is looking for the longest common path,
shared by all the WA folder path. e.g

  foo/bar foo/bar2 would become respectively bar and bar2.

A problem occurs when using a path with WAOutput that is the root of a
WA folder. (e.g. foobar where foobar/__meta exists). This common path
(common_prefix) would then be PosixPath('.'). Pathlib cannot use a such
path with relative_to() and raises the following error:

   ValueError: '/foo/bar/' does not start with ''

Fixing this problem by converting common_prefix to an absolute path.
parent 23e2e6bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment