fix some issues when writing binary data into an XML file

This commit is contained in:
wmayer
2012-05-10 12:07:37 +02:00
parent e2813c845f
commit 435d4f82d7
2 changed files with 15 additions and 9 deletions

View File

@@ -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");