From c33223741f09172a66546da12428136d4803d17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Tue, 14 Jan 2025 17:33:27 +0100 Subject: [PATCH] [core] Attribute: Strip ending "/" from invalidation values By doing so, invalidation values will evaluate to the same UID independently from whether the attribute's value has been written with an extra "/" or not. --- meshroom/core/attribute.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meshroom/core/attribute.py b/meshroom/core/attribute.py index dd69db1251..0c43187a61 100644 --- a/meshroom/core/attribute.py +++ b/meshroom/core/attribute.py @@ -267,8 +267,11 @@ def uid(self): # To guarantee that each output attribute receives a unique ID, we add the attribute name to it. return hashValue((self.name, self.node._uid)) else: - # only dependent on the hash of its value without the cache folder - return hashValue(self._invalidationValue) + # Only dependent on the hash of its value without the cache folder. + # "/" at the end of the link is stripped to prevent having different UIDs depending on + # whether the invalidation value finishes with it or not + strippedInvalidationValue = self._invalidationValue.rstrip("/") + return hashValue(strippedInvalidationValue) if self.isLink: linkParam = self.getLinkParam(recursive=True) return linkParam.uid()