Skip to content

Commit

Permalink
Fix #1151 (#1152)
Browse files Browse the repository at this point in the history
* Fix #1151

* Bug found on cod from sarra component. Prevents having to add patch to computeIdentity
  • Loading branch information
andreleblanc11 authored Aug 7, 2024
1 parent 301519e commit 46c3bef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sarracenia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ def computeIdentity(msg, path, o, offset=0, data=None) -> None:
logger.debug("mtime remembered by xattr")
fxainteg = xattr.get('identity')
if fxainteg['method'] == o.identity_method:
msg['identity'] = fxainteg
return
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 46c3bef

Please sign in to comment.