[SERVER-71876] writeFile() shell helper errors when given relative path Created: 05/Dec/22 Updated: 29/Oct/23 Resolved: 08/Dec/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Zixuan Zhuang | Assignee: | Alex Neben |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Description |
The writeOutput function is
|
| Comments |
| Comment by Githook User [ 08/Dec/22 ] | ||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Alexander Neben', 'email': 'alexander.neben@mongodb.com', 'username': 'IamXander'}Message: | ||||||||||||||||||||||||||||||||||||
| Comment by Alex Neben [ 07/Dec/22 ] | ||||||||||||||||||||||||||||||||||||
|
Between both versions boost `("./abc.txt").lexically_normal()` returned `./abc.txt` and now returns `abc.txt`. Feeding the following into `boost::parent_path` the former worked as expected and the latter caused an error. | ||||||||||||||||||||||||||||||||||||
| Comment by Alex Neben [ 07/Dec/22 ] | ||||||||||||||||||||||||||||||||||||
|
Just confirmed the boost upgrade caused the problem.
vs
This upgrade was from boost 1.76 -> 1.79. Looking through the docs to find how to restore previous behavior. | ||||||||||||||||||||||||||||||||||||
| Comment by Max Hirschhorn [ 07/Dec/22 ] | ||||||||||||||||||||||||||||||||||||
|
I'm concerned we don't have an understanding as to why the behavior of writeFile() changed across MongoDB versions despite its C++ definition not having been changed.
| ||||||||||||||||||||||||||||||||||||
| Comment by Alex Neben [ 07/Dec/22 ] | ||||||||||||||||||||||||||||||||||||
|
To me it seems like the workaround works fine (e.g. prepending pwd() + path). Please feel free to reopen if you are concerned about this approach. | ||||||||||||||||||||||||||||||||||||
| Comment by Zixuan Zhuang [ 06/Dec/22 ] | ||||||||||||||||||||||||||||||||||||
|
|