From 755d22afbdef35cdc0fdea4faf37c0417d03ea0d Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 25 Jan 2016 21:55:56 +0200 Subject: [PATCH] Strip trailing slash from prefix. Closes #366. --- mesonbuild/mesonmain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 5cca0a5b1..2686818a4 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -83,6 +83,8 @@ class MesonApp(): (self.source_dir, self.build_dir) = self.validate_dirs(dir1, dir2, handshake) if not os.path.isabs(options.prefix): raise RuntimeError('--prefix must be an absolute path.') + if options.prefix.endswith('/') or options.prefix.endswith('\\'): + options.prefix = options.prefix[:-1] self.meson_script_file = script_file self.options = options