summaryrefslogtreecommitdiff
path: root/RealtimeSync/xml_proc.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
commitc8e0e909b4a8d18319fc65434a10dc446434817c (patch)
treeeee91e7d2ce229dd043811eae8f1e2bd78061916 /RealtimeSync/xml_proc.cpp
parent5.2 (diff)
downloadFreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip
5.3
Diffstat (limited to 'RealtimeSync/xml_proc.cpp')
-rw-r--r--RealtimeSync/xml_proc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/RealtimeSync/xml_proc.cpp b/RealtimeSync/xml_proc.cpp
index 4f9306d2..891cb2df 100644
--- a/RealtimeSync/xml_proc.cpp
+++ b/RealtimeSync/xml_proc.cpp
@@ -36,22 +36,22 @@ bool isXmlTypeRTS(const XmlDoc& doc) //throw()
}
-void xmlAccess::readRealConfig(const wxString& filename, XmlRealConfig& config)
+void xmlAccess::readRealConfig(const Zstring& filename, XmlRealConfig& config)
{
- if (!fileExists(toZ(filename)))
- throw FfsXmlError(_("File does not exist:") + L"\n\"" + toZ(filename) + L"\"");
+ if (!fileExists(filename))
+ throw FfsXmlError(replaceCpy(_("Cannot find file %x."), L"%x", fmtFileName(filename)));
XmlDoc doc;
- loadXmlDocument(toZ(filename), doc); //throw (FfsXmlError)
+ loadXmlDocument(filename, doc); //throw FfsXmlError
if (!isXmlTypeRTS(doc))
- throw FfsXmlError(_("Error parsing configuration file:") + L"\n\"" + toZ(filename) + L"\"");
+ throw FfsXmlError(replaceCpy(_("File %x does not contain a valid configuration."), L"%x", fmtFileName(filename)));
XmlIn in(doc);
::readConfig(in, config);
if (in.errorsOccured())
- throw FfsXmlError(_("Configuration loaded partially only:") + L"\n\"" + toZ(filename) + L"\"\n\n" +
+ throw FfsXmlError(replaceCpy(_("Configuration file %x loaded partially only."), L"%x", fmtFileName(filename)) + L"\n\n" +
getErrorMessageFormatted(in), FfsXmlError::WARNING);
}
@@ -67,7 +67,7 @@ void writeConfig(const XmlRealConfig& config, XmlOut& out)
}
-void xmlAccess::writeRealConfig(const XmlRealConfig& config, const wxString& filename)
+void xmlAccess::writeRealConfig(const XmlRealConfig& config, const Zstring& filename)
{
XmlDoc doc("FreeFileSync");
doc.root().setAttribute("XmlType", "REAL");
@@ -75,5 +75,5 @@ void xmlAccess::writeRealConfig(const XmlRealConfig& config, const wxString& fil
XmlOut out(doc);
writeConfig(config, out);
- saveXmlDocument(doc, toZ(filename)); //throw (FfsXmlError)
+ saveXmlDocument(doc, filename); //throw (FfsXmlError)
}
bgstack15