Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zet File Parsing non-Isosec bug #14

Merged
merged 1 commit into from
Apr 30, 2022
Merged

Zet File Parsing non-Isosec bug #14

merged 1 commit into from
Apr 30, 2022

Conversation

danielmichaels
Copy link
Owner

Parsing directories ignores any non-isosec files

This fixes issues where the zet repo has directories or files which are not isosec dirs. For instance, a README.md in the zet root would cause the app to fail.

The fix includes running a regex over the list of files

const zetRegex = "^[0-9]{14,}$"

r := regexp.MustCompile(zetRegex)
	// trunc most of the implementation

	for _, f := range fileInfo {
		if !r.MatchString(f.Name()) {
			continue
		}
	}
	return files, nil

This fixes issues where the `zet` repo has directories or files which are not isosec dirs. For instance, a README.md in the zet root would cause the app to fail.

Signed-off-by: Daniel Michaels <dan@danielms.site>
@danielmichaels danielmichaels added the bug Something isn't working label Apr 30, 2022
@danielmichaels danielmichaels merged commit b2e8374 into main Apr 30, 2022
@danielmichaels danielmichaels deleted the regex-dir branch April 30, 2022 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant