diff --git a/flit/install.py b/flit/install.py index a6e849d0..8fb5f9bf 100644 --- a/flit/install.py +++ b/flit/install.py @@ -201,8 +201,7 @@ def install_data_dir(self, target_data_dir): rel_path = os.path.relpath(src_path, self.ini_info.data_directory) dst_path = os.path.join(target_data_dir, rel_path) os.makedirs(os.path.dirname(dst_path), exist_ok=True) - if os.path.exists(dst_path): - os.remove(dst_path) + pathlib.Path(dst_path, missing_ok=True) if self.symlink: os.symlink(os.path.realpath(src_path), dst_path) else: