Revert incorrect Rwalk changes, introduce additional test#32
Closed
zakkor wants to merge 6 commits intodroyo:masterfrom
Closed
Revert incorrect Rwalk changes, introduce additional test#32zakkor wants to merge 6 commits intodroyo:masterfrom
Rwalk changes, introduce additional test#32zakkor wants to merge 6 commits intodroyo:masterfrom
Conversation
If the name already existed, then there's no need to Put it, otherwise it gets set inside the Do call, which also means there's no need to Put it.
…back `statGuess` guesses We make sure the fallback statGuess name is the base file name, not the absolute path. Otherwise in scenarios where statGuess does not manage to find a Name method on the underlying object, it will return an absolute path, which will generate bad message errors, due to slashes not being allowed in file names.
When a styxfile.Directory is passed as the result of a Tcreate call and the underlying object does not have a Stat method, statGuess does not manage to detect any underlying fs.FileInfo methods, (e.g.: Name, Mode, ...) which means that for opened directories, the results of Tstat are always an incorrectly guessed fallback value
Contributor
Author
|
Closing this PR in favour of #34, which introduces the same fix, but from a different branch. Github won't let me change the source branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reverts incorrect changes introduced in #30, which broke Rwalk (for which there were failing tests that went unnoticed).
Also removes a superfluous
Putcall in qidpool: if it already exists, there's no need to Put it, otherwise it gets handled inside theDoblock, so still no need for aPut.In the #30 PR, @seh-msft says:
If there's a new file being created, that means the file doesn't exist yet, which means the Twalk should fail. In the event of an unsuccessful Twalk, no new Qid should be created. I've added a new test that verifies this behaviour is true.
Considering the above, this is still true: Twalk fails, no Qid is created, then Tcreate occurs, and the Qid and file get created.
In conclusion, the current behaviour is correct, so this PR reverts back to that -- there was no need for a fix. I am not sure what issues the original submitter was facing, but I am guessing that they were not coming from styx.
Resolves #31