Reverting the patch is a step in the wrong direction. The current code deletes
existing files, which simplifies various permission issues.
The -problem- is down in util.set_flags. For a symlink, we write out a -file-,
then read it back in and convert it to a symlink. Instead, we should just create
a symlink in the first place if that's allowed. Something like:
if self._uselinks and "l" in flags:
os.symlink(data, f)
else:
file("f", "w").write(data) |