Skip to content

Commit c51a567

Browse files
committed
#4241: Poco::FileInputStream broken in 1.12.5 and 1.11.8
1 parent c04dfdb commit c51a567

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

CHANGELOG

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
This is the changelog file for the POCO C++ Libraries.
22

3+
Release 1.12.5p1 (2023-11-02)
4+
=============================
5+
6+
- GH #4241: Poco::FileInputStream broken in 1.12.5 and 1.11.8
7+
8+
39
Release 1.12.5 (2023-10-25)
410
===========================
511

DLLVersion.rc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#include "winres.h"
66

7-
#define POCO_VERSION 1,12,5,0
8-
#define POCO_VERSION_STR "1.12.5"
7+
#define POCO_VERSION 1,12,5,1
8+
#define POCO_VERSION_STR "1.12.5p1"
99

1010
VS_VERSION_INFO VERSIONINFO
1111
FILEVERSION POCO_VERSION

Foundation/include/Poco/Version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
// Ax: alpha releases
3636
// Bx: beta releases
3737
//
38-
#define POCO_VERSION 0x010C0500
38+
#define POCO_VERSION 0x010C0501
3939

4040

4141
#endif // Foundation_Version_INCLUDED

Foundation/src/FileStream.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ FileIOS::~FileIOS()
3939
void FileIOS::open(const std::string& path, std::ios::openmode mode)
4040
{
4141
clear();
42+
if (!(mode & std::ios::in) && !(mode & std::ios::out))
43+
{
44+
mode |= _defaultMode;
45+
}
4246
_buf.open(path, mode);
4347
}
4448

@@ -73,7 +77,7 @@ FileInputStream::FileInputStream():
7377

7478

7579
FileInputStream::FileInputStream(const std::string& path, std::ios::openmode mode):
76-
FileIOS(mode | std::ios::in),
80+
FileIOS(std::ios::in),
7781
std::istream(&_buf)
7882
{
7983
open(path, mode | std::ios::in);
@@ -93,7 +97,7 @@ FileOutputStream::FileOutputStream():
9397

9498

9599
FileOutputStream::FileOutputStream(const std::string& path, std::ios::openmode mode):
96-
FileIOS(mode | std::ios::out),
100+
FileIOS(std::ios::out),
97101
std::ostream(&_buf)
98102
{
99103
open(path, mode | std::ios::out);
@@ -113,7 +117,7 @@ FileStream::FileStream():
113117

114118

115119
FileStream::FileStream(const std::string& path, std::ios::openmode mode):
116-
FileIOS(mode),
120+
FileIOS(std::ios::in | std::ios::out),
117121
std::iostream(&_buf)
118122
{
119123
open(path, mode);

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.12.5
1+
1.12.5p1

doc/99100-ReleaseNotes.page

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
POCO C++ Libraries Release Notes
22
AAAIntroduction
33

4+
!!!Release 1.12.5p1
5+
6+
!! Summary of Changes
7+
8+
- GH #4241: Poco::FileInputStream broken in 1.12.5 and 1.11.8
9+
10+
411
!!!Release 1.12.5
512

613
!!Summary of Changes

0 commit comments

Comments
 (0)