Handle EOL when update VCS ignore file

This commit is contained in:
Ivan Kravets committed 2016-08-29 13:35:35 +03:00
1 parent 6765a60ec3
commit 22bb1c39b1
2 files changed
+3 -1

No files matched your search

Submodule examples updated: e614de50bf...5cafb1f792.
+2
View File
@@ -278,6 +278,8 @@ def init_cvs_ignore(project_dir):
if isfile(ignore_path):
with open(ignore_path) as fp:
current = fp.readlines()
if current and not current[-1].endswith("\n"):
current[-1] += "\n"
for d in default:
if d not in current:
current.append(d)