From 4178267bfef82a6ebf35dc353bb7915c2d3fda94 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 20 Nov 2018 11:04:01 -0500 Subject: minstall: Do not delete dst files when installing a directory do_copyfile() already takes the decision to delete or preserve them. Also do not append a confusing '.' in log messages that finish by a file path. --- mesonbuild/minstall.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mesonbuild') diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index fc25057..8ac6aab 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -238,7 +238,7 @@ class Installer: 'a file'.format(to_file)) if self.should_preserve_existing_file(from_file, to_file): append_to_log(self.lf, '# Preserving old file %s\n' % to_file) - print('Preserving existing file %s.' % to_file) + print('Preserving existing file %s' % to_file) return False os.remove(to_file) print('Installing %s to %s' % (from_file, outdir)) @@ -316,8 +316,6 @@ class Installer: abs_dst = os.path.join(dst_dir, filepart) if os.path.isdir(abs_dst): print('Tried to copy file %s but a directory of that name already exists.' % abs_dst) - if os.path.exists(abs_dst): - os.remove(abs_dst) parent_dir = os.path.dirname(abs_dst) if not os.path.isdir(parent_dir): os.mkdir(parent_dir) -- cgit v1.1