From bb7c0a163f8f39993d8ec8927a852f83f3c34985 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 12 Feb 2020 03:06:12 +0530 Subject: minstall: Error out when trying to copy file to dir Not sure why this wasn't already an error. It's a bad situation to be in, and we should not ignore it. --- mesonbuild/minstall.py | 1 + 1 file changed, 1 insertion(+) (limited to 'mesonbuild') diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 98bf5c8..9ac5a29 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -321,6 +321,7 @@ 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) + sys.exit(1) parent_dir = os.path.dirname(abs_dst) if not os.path.isdir(parent_dir): os.mkdir(parent_dir) -- cgit v1.1