BLI_path: assert passing relative paths to BLI_path_cmp_normalized

Assert when "//" prefixed relative paths are passed to
BLI_path_cmp_normalized as this can't be expanded
and it's possible the paths come from different blend files.
This commit is contained in:
Campbell Barton 2022-01-28 15:02:13 +11:00
parent ebd0e76088
commit 9523b1478e
1 changed files with 2 additions and 0 deletions

View File

@ -1832,6 +1832,8 @@ void BLI_path_slash_native(char *path)
int BLI_path_cmp_normalized(const char *p1, const char *p2)
{
BLI_assert_msg(!BLI_path_is_rel(p1) && !BLI_path_is_rel(p2), "Paths arguments must be absolute");
/* Normalize the paths so we can compare them. */
char norm_p1[FILE_MAX];
char norm_p2[FILE_MAX];