On Thu, 13 Sep 2007, Han-Wen Nienhuys wrote:

2007/9/13, Reinhold Kainhofer <[EMAIL PROTECTED]>:
+        if filename[-1] == '.':
+            filename += "xml"
+        elif not re.match ("\.xml$", filename):
+            filename += ".xml"

this looks a bit strange.
Do you mean a boolean or here?

No, I'm checking the filename and appending .xml if it's not there (or only
xml if the filename already ends in a "."). The logic is:

If file with given filename exists => Use that filename

both if-bodies are the same. That can't be right.


Isn't the right thing to completely drop the first "if"? If a user really choses a filename that ends with ".", I think the correct behavior is to append ".xml" (rather than just "xml"). For example, imagine a windows user chosing the filename "This is a complete sentence." If you only append "xml", the dot will disappear from the filename that is displayed to the user in the windows GUI. I think, the correct full filename should in this case be "This is a complete sentence..xml". Or do I miss something?

Greetings,
Juergen


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to