OSDN Git Service

Change generation of files/paths in xml dir to use FileManager
authorNick Clarke <memorius@gmail.com>
Mon, 19 Jul 2010 15:02:04 +0000 (03:02 +1200)
committerRandy Baumgarte <randy@fbn.cx>
Fri, 23 Jul 2010 09:31:06 +0000 (05:31 -0400)
src/cx/fbn/nevernote/evernote/EnmlConverter.java
src/cx/fbn/nevernote/xml/XMLNoteRepair.java

index 29b4ef7..a6359a1 100644 (file)
@@ -135,7 +135,7 @@ public class EnmlConverter {
                // fail if the user doesn't have internet connectivity.  The local copy\r
                // also contains the 3 other PUBLIC definitions at the beginning of the dtd.\r
                newContent = v.getValue();\r
                // fail if the user doesn't have internet connectivity.  The local copy\r
                // also contains the 3 other PUBLIC definitions at the beginning of the dtd.\r
                newContent = v.getValue();\r
-               File dtdFile = new File(Global.getDirectoryPath()+"xml/enml2.dtd");\r
+               File dtdFile = Global.getFileManager().getXMLDirFile("enml2.dtd");\r
                String dtd = dtdFile.toURI().toString();\r
                newContent = newContent.replace("<!DOCTYPE en-note SYSTEM \'http://xml.evernote.com/pub/enml2.dtd'>", \r
                                "<!DOCTYPE en-note SYSTEM \"" +dtd +"\">");\r
                String dtd = dtdFile.toURI().toString();\r
                newContent = newContent.replace("<!DOCTYPE en-note SYSTEM \'http://xml.evernote.com/pub/enml2.dtd'>", \r
                                "<!DOCTYPE en-note SYSTEM \"" +dtd +"\">");\r
index 0818de8..8fec2bc 100644 (file)
@@ -42,7 +42,7 @@ public class XMLNoteRepair {
                XMLNoteRepairHandler handler = new XMLNoteRepairHandler();
                
                // Replace DTD with local copy in case we are not connected
                XMLNoteRepairHandler handler = new XMLNoteRepairHandler();
                
                // Replace DTD with local copy in case we are not connected
-               File dtdFile = new File(Global.getDirectoryPath()+"xml/enml2.dtd");
+               File dtdFile = Global.getFileManager().getXMLDirFile("enml2.dtd");
                String dtd = dtdFile.toURI().toString();
                xmlData = xmlData.replace("<!DOCTYPE en-note SYSTEM \'http://xml.evernote.com/pub/enml2.dtd'>", 
                                "<!DOCTYPE en-note SYSTEM \"" +dtd +"\">");
                String dtd = dtdFile.toURI().toString();
                xmlData = xmlData.replace("<!DOCTYPE en-note SYSTEM \'http://xml.evernote.com/pub/enml2.dtd'>", 
                                "<!DOCTYPE en-note SYSTEM \"" +dtd +"\">");