diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-02-21 13:14:25 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-02-21 13:14:25 +0200 |
commit | 0469128f46f9d7239426868b168323d0d5adb9b8 (patch) | |
tree | 06fd552219a8e37ec25d14d7431fa3628f2bc8d7 /mesonbuild/mesonmain.py | |
parent | f74d6201eb1bd36f666604fa301922b5183ef14e (diff) | |
download | meson-0469128f46f9d7239426868b168323d0d5adb9b8.zip meson-0469128f46f9d7239426868b168323d0d5adb9b8.tar.gz meson-0469128f46f9d7239426868b168323d0d5adb9b8.tar.bz2 |
Preserve 'C:\' as an absolute path in prefix.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 5379955..774502b 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -84,7 +84,12 @@ class MesonApp(): if not os.path.isabs(options.prefix): raise RuntimeError('--prefix value \'{0}\' must be an absolute path: '.format(options.prefix)) if options.prefix.endswith('/') or options.prefix.endswith('\\'): - options.prefix = options.prefix[:-1] + # On Windows we need to preserve the trailing slash if the + # string is of type 'C:\' because 'C:' is not an absolute path. + if len(options.prefix) == 3 and options.prefix[1] == ':': + pass + else: + options.prefix = options.prefix[:-1] self.meson_script_file = script_file self.options = options |