Skip to content

Fix rename not accounted in the hash computation #63

Merged
jkent merged 1 commit intojkent:mainfrom
X-Ryl669:fixRename
Aug 25, 2024
Merged

Fix rename not accounted in the hash computation #63
jkent merged 1 commit intojkent:mainfrom
X-Ryl669:fixRename

Conversation

@X-Ryl669
Copy link
Copy Markdown
Contributor

In the current code, if a rename transform is set up, the renamed file isn't findable directly via frogfs_get_entry (it's accessible via opendir/readdir).

This is because the hash was computed on the previous name (without renaming).
This patch solves the issue by using the destination name. So now, it's possible to get an entry directly and via opendir/readdir too.

Comment thread tools/mkfrogfs.py
if 'meta' in transform:
dest = pipe_script(transform['path'], args, str.encode(ent['dest'])).decode()
ent['dest'] = dest
ent['name'] = dest.split('/')[-1]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This threw me off, but I see you're doing it for completeness. Good job!

Copy link
Copy Markdown
Owner

@jkent jkent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks X-Ryl669

@jkent jkent merged commit 9477168 into jkent:main Aug 25, 2024
@jkent jkent moved this to To triage in ACEWS Ecosystem Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants