Commit 1ead1921 authored by Michał Górny's avatar Michał Górny

Unlink destination file before writing scripts.

parent 3a53d257
......@@ -799,6 +799,8 @@ Please make the appropriate changes for your system and try again.
mask = current_umask()
if not self.dry_run:
ensure_directory(target)
if os.path.exists(target):
os.unlink(target)
f = open(target,"w"+mode)
f.write(contents)
f.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment