Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Memfile stuff #561
base: master
Are you sure you want to change the base?
Memfile stuff #561
Changes from 28 commits
b9d7f36
8513fed
07a6b6a
7bf7a25
6b2b978
688c055
a0a4a52
8ee6563
f215740
d41c7d4
87fa218
a5d4316
4404cc8
656a9db
b1d53f7
cbf7fcd
4b73c93
82cd5ca
5fd4ff4
660c973
6c452cc
6563249
ad0d7df
7e1a518
d3a55c7
bff300b
1d040d6
706f4f1
1ae2738
3d7324a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
And… 🤦♀️ we run into another bug of design.
The problem here is that we’re going to need to Marshal
flags
itself based on ifls(fs.Extended)
is set or not. 😐This split implementation is really going to drive me nuts, and might just drive me mad enough to go ahead and just roll out v2…
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.
See? Think about what if
flags & sshFileXferAttrExtended == sshFileXferAttrExtended
andlen(fileStat.Extended) == 0
.We’re going to encode a corrupted packet. 🤦♀️
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.
Thankfully, that's not actually possible, but why it's not possible is subtle:
That's from fileStatFromInfo.
So it's not possible to have sshFileXferAttrExtended set while len(fileStat.Extended) == 0.
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.
Yes, for
marshalFileInfo
this might be true, but sinceFileStat.MarshalTo
would be exported, more people can call it than just this code here, and theRequestServer
code as well.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.
We should not be defaulting this value. Please, pass it as a parameter, and document in the godoc that it is ignored if the creation flag is not set.
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.
Fair enough, I had defaulted to the value that we previously hard coded. I'll take a crack at getting it from the initial request.
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 function also now needs to that directories might have non-default modes.