[Mono-bugs] [Bug 533523] Mysterious bad string with System.Resources.ResXResourceWriter

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 27 17:40:09 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=533523

User surfzoid2002 at yahoo.fr added comment
http://bugzilla.novell.com/show_bug.cgi?id=533523#c3





--- Comment #3 from Eric Petit <surfzoid2002 at yahoo.fr>  2009-10-27 15:40:03 MDT ---
This bug is really too weird, it occur when the Mono xmlwritter flush, only the
first time i generate the file, so after lot of hours, i used a sadly
workarround : 


        public static void MonoBug()

        {

            if (File.Exists(VarGlobale.SkinFontPath))

            {

                    string XmlDt = File.ReadAllText(VarGlobale.SkinFontPath);

                    int Idx = 0;

                    string BadBoy = @"</root>";

                    List<int> IdxFind = new List<int>();

                    while (Idx >= 0) {

                        Idx = XmlDt.IndexOf(BadBoy,Idx);

                        if(Idx > -1)

                        {

                            IdxFind.Add(Idx);

                            Idx +=1;

                        }

                    }

                    if(IdxFind.Count >= 2)

                    {

                    int StartDel = IdxFind[0] + BadBoy.Length;

                        XmlDt = XmlDt.Remove(StartDel);

                    }

                    File.WriteAllText(VarGlobale.SkinFontPath, XmlDt);

                    }

        }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list