lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add backup option to convert-ly (Issue 3572) (issue 14040043)


From: dak
Subject: Re: Add backup option to convert-ly (Issue 3572) (issue 14040043)
Date: Fri, 04 Oct 2013 14:24:53 +0000


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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]