https://codereview.appspot.com/14040043/diff/6001/scripts/convert-ly.py
File scripts/convert-ly.py (right):

https://codereview.appspot.com/14040043/diff/6001/scripts/convert-ly.py#newcode241
scripts/convert-ly.py:241: while os.path.exists(back_up) and
os.path.isfile(back_up):
I'd do a repeat-until loop here in order to keep non-numbered and
numbered backup files strictly separate.

With the current code, if there is no file~, the backup file will always
(even in the presence of -n) be called file~, but file~ is much more
prone to overwriting accidentally than file.~1~ not least of all by
convert-ly (when called without -n option at a later point of time)
itself.

The expectation is that a file created with -n option will not be
deleted automatically.  Naming the first "numbered" backup file file~
will violate that expectation.

https://codereview.appspot.com/14040043/

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

Reply via email to