From 734d83524038d6b71c3e8a263c58fd87c4180ee1 Mon Sep 17 00:00:00 2001 From: bclothier Date: Thu, 19 Oct 2023 18:12:02 -0500 Subject: [PATCH 1/3] The logic for checking of existence of git files wasn't always working as expected due to searching the current directory rather than using the export folder. --- Version Control.accda.src/modules/modVCSUtility.bas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version Control.accda.src/modules/modVCSUtility.bas b/Version Control.accda.src/modules/modVCSUtility.bas index 40c424b9..b15f3b4d 100644 --- a/Version Control.accda.src/modules/modVCSUtility.bas +++ b/Version Control.accda.src/modules/modVCSUtility.bas @@ -794,7 +794,7 @@ Public Sub CheckGitFiles() Dim strFile As String Dim blnAdded As Boolean - strPath = CurrentProject.Path & PathSep + strPath = Options.GetExportFolder If FSO.FolderExists(strPath & ".git") Then ' gitignore file From 4703b7bac13a6799e7f4221cfdbbdfc1e6303a67 Mon Sep 17 00:00:00 2001 From: bclothier Date: Thu, 19 Oct 2023 18:17:33 -0500 Subject: [PATCH 2/3] Add a check when loading XML and verify it was successfully parsed. This avoid generating a bad export where the data are not actually exported due to invalid XML being generated by Application.ExportXML. Unfortunately, if a table contains any characters that aren't valid for XML document, it won't try to escape them and include them as literals. Even if they were escaped, they might not be accepted anyway. XML specifications forbids having any characters in 0x01-0x31 range so if a table data contains such characters, this can cause the XML export to fail. In this case, tab delimited will have to be used instead. However, the previous version was simply silently exporting as if everything is hunky-dory when it's not. Hence, the error. --- Version Control.accda.src/modules/modSanitize.bas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Version Control.accda.src/modules/modSanitize.bas b/Version Control.accda.src/modules/modSanitize.bas index 2e284b39..c84f2a70 100644 --- a/Version Control.accda.src/modules/modSanitize.bas +++ b/Version Control.accda.src/modules/modSanitize.bas @@ -618,7 +618,11 @@ Public Function SanitizeXML(strPath As String, blnReturnHash As Boolean) As Stri Set objXml = New MSXML2.DOMDocument60 End If - objXml.LoadXML strFile + If objXml.LoadXML(strFile) = False Then + Log.Error eelError, _ + "Unable to parse the XML for file '" & strPath & "'. This may be due to containing malformed XML. Check the source XML document for validity. In some cases, this may be due to table data containing characters not allowed in XML documents.", ModuleName & ".SanitizeXML" + Exit Function + End If ' Determine if it's a table data with schema For Each objNode In objXml.SelectNodes("/root/dataroot") From 0d9ac0a74c1e0815a90931cec21c7b469e3b8965 Mon Sep 17 00:00:00 2001 From: bclothier Date: Thu, 19 Oct 2023 18:19:17 -0500 Subject: [PATCH 3/3] The export log was littered with bunch of warnings about unclosed blocks. This seems to be due to not closing it when evaluating the UseTheme. Even if we skipped it, we still need to remove it from m_colBlocks to balance everything out. --- Version Control.accda.src/modules/modSanitize.bas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Version Control.accda.src/modules/modSanitize.bas b/Version Control.accda.src/modules/modSanitize.bas index c84f2a70..5eb760be 100644 --- a/Version Control.accda.src/modules/modSanitize.bas +++ b/Version Control.accda.src/modules/modSanitize.bas @@ -394,8 +394,12 @@ Private Sub CloseBlock() ' Skip if we are not using themes for this control (UseTheme=0) ' (Applies to "CommandButton", "Tab", "ToggleButton") - If dBlock.Exists("UseTheme") Then Exit Sub - + If dBlock.Exists("UseTheme") Then + ' Remove this block + m_colBlocks.Remove m_colBlocks.Count + Exit Sub + End If + ' Build array of base properties varBase = Array("Back", "AlternateBack", "Border", _ "Fore", "Gridline", "HoverFore", _