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

Fix: relative path will result infinite loop #1047

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

chenk008
Copy link
Contributor

@chenk008 chenk008 commented Oct 19, 2021

will result an infinite loop when the path is relative.

Add validation to avoid it.

Signed-off-by: chenk008 kongchen28@gmail.com

@@ -163,6 +163,11 @@ func TestMkdirAs(t *testing.T) {
if err := compareTrees(testTree, verifyTree); err != nil {
t.Fatal(err)
}

// relative path will return an error
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same filepath.IsAbs should be a better choice right ?

@chenk008 chenk008 force-pushed the fix_infinite_loop branch 6 times, most recently from 5be8842 to ff99167 Compare October 19, 2021 10:16
Signed-off-by: chenk008 <kongchen28@gmail.com>
@rhatdan
Copy link
Member

rhatdan commented Oct 19, 2021

LGTM

@TomSweeneyRedHat
Copy link
Member

LGTM
I've restarted the failed test, it looked to be a network flake.

@rhatdan rhatdan merged commit b2499de into containers:main Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants