Skip to content

Commit

Permalink
Bug found on cod from sarra component. Prevents having to add patch t…
Browse files Browse the repository at this point in the history
…o computeIdentity
  • Loading branch information
andreleblanc11 committed Aug 7, 2024
1 parent dd87191 commit 9c580d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions sarracenia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,9 @@ def computeIdentity(msg, path, o, offset=0, data=None) -> None:
if xattr.get('mtime') >= msg['mtime']:
logger.debug("mtime remembered by xattr")
fxainteg = xattr.get('identity')
if fxainteg != 'null':
if fxainteg['method'] == o.identity_method:
msg['identity'] = fxainteg
return
if fxainteg['method'] == o.identity_method:
msg['identity'] = fxainteg
return
logger.debug("xattr different method than on disk")
calc_method = o.identity_method
else:
Expand Down
5 changes: 4 additions & 1 deletion sarracenia/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2096,7 +2096,10 @@ def download(self, msg, options) -> bool:
if self.o.identity_method.startswith('cod,'):
download_algo = self.o.identity_method[4:]
elif 'identity' in msg:
download_algo = msg['identity']['method']
if msg['identity']['method'] == 'cod':
download_algo = msg['identity']['value']
else:
download_algo = msg['identity']['method']
else:
download_algo = None

Expand Down

0 comments on commit 9c580d5

Please sign in to comment.