git-svn-id: svn://db.shs.com.ru/pip@237 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -131,7 +131,7 @@ PIFile::PIFile(const PIString & path, PIIODevice::DeviceMode mode): PIIODevice(p
|
|||||||
fdi = -1;
|
fdi = -1;
|
||||||
setPrecision(5);
|
setPrecision(5);
|
||||||
if (!path.isEmpty())
|
if (!path.isEmpty())
|
||||||
openDevice();
|
open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -147,7 +147,6 @@ bool PIFile::openDevice() {
|
|||||||
close();
|
close();
|
||||||
PIString p = path();
|
PIString p = path();
|
||||||
if (p.isEmpty()) return false;
|
if (p.isEmpty()) return false;
|
||||||
//piCout << "fopen " << path_.data() << ": " << strType(mode_).data() << fd;
|
|
||||||
if ((mode_ & PIIODevice::WriteOnly) == PIIODevice::WriteOnly) {
|
if ((mode_ & PIIODevice::WriteOnly) == PIIODevice::WriteOnly) {
|
||||||
if (!isExists(p)) {
|
if (!isExists(p)) {
|
||||||
FILE * fd = fopen(p.data(), "w");
|
FILE * fd = fopen(p.data(), "w");
|
||||||
@@ -155,6 +154,7 @@ bool PIFile::openDevice() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fd = _fopen_call_(p.data(), strType(mode_).data());
|
fd = _fopen_call_(p.data(), strType(mode_).data());
|
||||||
|
//piCout << "fopen " << path() << ": " << strType(mode_).data() << fd;
|
||||||
bool opened = (fd != 0);
|
bool opened = (fd != 0);
|
||||||
if (opened) {
|
if (opened) {
|
||||||
fdi = fileno(fd);
|
fdi = fileno(fd);
|
||||||
|
|||||||
Reference in New Issue
Block a user