Fixes #15, file opened are now opened as binary.
This commit is contained in:
parent
3b85cd0c54
commit
c9f8a59a4d
2 changed files with 2 additions and 2 deletions
|
|
@ -94,7 +94,7 @@ int main() {
|
||||||
path+="/index.html";
|
path+="/index.html";
|
||||||
if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) {
|
if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) {
|
||||||
ifstream ifs;
|
ifstream ifs;
|
||||||
ifs.open(path.string(), ifstream::in);
|
ifs.open(path.string(), ifstream::in | ios::binary);
|
||||||
|
|
||||||
if(ifs) {
|
if(ifs) {
|
||||||
ifs.seekg(0, ios::end);
|
ifs.seekg(0, ios::end);
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ int main() {
|
||||||
path+="/index.html";
|
path+="/index.html";
|
||||||
if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) {
|
if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) {
|
||||||
ifstream ifs;
|
ifstream ifs;
|
||||||
ifs.open(path.string(), ifstream::in);
|
ifs.open(path.string(), ifstream::in | ios::binary);
|
||||||
|
|
||||||
if(ifs) {
|
if(ifs) {
|
||||||
ifs.seekg(0, ios::end);
|
ifs.seekg(0, ios::end);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue