fix some issues when writing binary data into an XML file
This commit is contained in:
@@ -296,7 +296,7 @@ void PropertyFileIncluded::Restore(Base::XMLReader &reader)
|
||||
|
||||
void PropertyFileIncluded::SaveDocFile (Base::Writer &writer) const
|
||||
{
|
||||
std::ifstream from(_cValue.c_str());
|
||||
Base::ifstream from(Base::FileInfo(_cValue.c_str()));
|
||||
if (!from)
|
||||
throw Base::Exception("PropertyFileIncluded::SaveDocFile() "
|
||||
"File in document transient dir deleted");
|
||||
@@ -311,7 +311,7 @@ void PropertyFileIncluded::SaveDocFile (Base::Writer &writer) const
|
||||
|
||||
void PropertyFileIncluded::RestoreDocFile(Base::Reader &reader)
|
||||
{
|
||||
std::ofstream to(_cValue.c_str());
|
||||
Base::ofstream to(Base::FileInfo(_cValue.c_str()));
|
||||
if (!to)
|
||||
throw Base::Exception("PropertyFileIncluded::RestoreDocFile() "
|
||||
"File in document transient dir deleted");
|
||||
|
||||
Reference in New Issue
Block a user