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

wallet: Use fsbridge::ifstream to fix Windows path issue #15468

Merged
merged 1 commit into from Feb 27, 2019

Conversation

@ken2812221
Copy link
Contributor

@ken2812221 ken2812221 commented Feb 23, 2019

Fix #15460

@ken2812221
Copy link
Contributor Author

@ken2812221 ken2812221 commented Feb 24, 2019

image

@MarcoFalke MarcoFalke added this to the 0.18.0 milestone Feb 24, 2019
@laanwj
Copy link
Member

@laanwj laanwj commented Feb 25, 2019

utACK 6ad79cb

Copy link
Contributor

@ryanofsky ryanofsky left a comment

utACK 6ad79cb. I was going to suggest that maybe there should be a linter only allowing use of fsbridge::ifstream, and not other ifstream classes. But this might be too strict because in a lot of cases we can know that filename being opened is ascii.

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Feb 26, 2019

Gitian builds for commit b4fc525 (master):

Gitian builds for commit fef7c84 (master and this pull):

@fanquake
Copy link
Member

@fanquake fanquake commented Feb 26, 2019

utACK 6ad79cb

@laanwj
Copy link
Member

@laanwj laanwj commented Feb 27, 2019

I was going to suggest that maybe there should be a linter only allowing use of fsbridge::ifstream, and not other ifstream classes.

File system access should always go through the fsbridge when possible, this is better for sandboxing. So I think this would be appropriate, as well as mentioning this in the developer notes of course.
(but not in this PR)

@laanwj laanwj merged commit 6ad79cb into bitcoin:master Feb 27, 2019
2 checks passed
laanwj added a commit that referenced this issue Feb 27, 2019
6ad79cb wallet: Use fsbridge::ifstream to fix Windows path issue (Chun Kuan Lee)

Pull request description:

  Fix #15460

Tree-SHA512: 1dab04184608543d49c86cbcfb679d63d35cb7bf3bde2e2d9ddf25ec8977de42b7131db5e81a305f3452858079dbcf68f6ad4624c89575d3d7e5b550687fc6ad
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Mar 24, 2020
Summary:
```
If compiled with mingw, use glibc++ extension stdio_filebuf to open the
file by FILE* instead of filename.

In other condition, we can use boost::fstream.
```

Backport of core [[bitcoin/bitcoin#13878 | PR13878]] and [[bitcoin/bitcoin#15468 | PR15468]] (related bug fix).

Depends on D5539.

Test Plan:
  ninja check
  make check

Run the Gitian builds.

Build and run for Windows. Run `test_bitcoin` on Windows.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5539
Munkybooty added a commit to Munkybooty/dash that referenced this issue Sep 8, 2021
…th issue

6ad79cb wallet: Use fsbridge::ifstream to fix Windows path issue (Chun Kuan Lee)

Pull request description:

  Fix bitcoin#15460

Tree-SHA512: 1dab04184608543d49c86cbcfb679d63d35cb7bf3bde2e2d9ddf25ec8977de42b7131db5e81a305f3452858079dbcf68f6ad4624c89575d3d7e5b550687fc6ad
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this issue Sep 11, 2021
…th issue

6ad79cb wallet: Use fsbridge::ifstream to fix Windows path issue (Chun Kuan Lee)

Pull request description:

  Fix bitcoin#15460

Tree-SHA512: 1dab04184608543d49c86cbcfb679d63d35cb7bf3bde2e2d9ddf25ec8977de42b7131db5e81a305f3452858079dbcf68f6ad4624c89575d3d7e5b550687fc6ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants