-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[chore][pkg/stanza] Unexport reader's file name field #27434
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ OUTER: | |
continue OUTER | ||
} | ||
|
||
if oldReader.FileName != newReader.FileName { | ||
if !newReader.NameEquals(oldReader) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a change of behavior? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so. The equal check is moved into the function. The inversion of the condition is met with a complimentary inversion of how we react to it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, this was a change. It should only continue the inner loop if the file names do not match. I opened #27454 to make the change separately. I'll plan on rebasing this PR. |
||
continue | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a rename right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, not just a rename. It also corrects the behavior. It was previously described in the function description that this should happen but it wasn't happening yet. I mentioned the correction in the PR description though I'm not sure this is a user visible change in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized you may have been asking about whether this could be a renamed file. If so:
I don't think we can ascertain whether the file has been renamed. We know the file name as it was when it was first opened (because we called
os.Open(filename)
), but there is no way to refresh the name from the information we have.