diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-11-23 23:58:46 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-04-14 18:37:04 -0400 |
commit | 6a287fae5d10d4c46277e2533aaa3093de05acf1 (patch) | |
tree | 25b5bbf535a50718042fcbfb865ad118bd7a5820 /mesonbuild/mesonlib/universal.py | |
parent | 19de032d207a847b9dc6f872cda7da1c91021037 (diff) | |
download | meson-6a287fae5d10d4c46277e2533aaa3093de05acf1.zip meson-6a287fae5d10d4c46277e2533aaa3093de05acf1.tar.gz meson-6a287fae5d10d4c46277e2533aaa3093de05acf1.tar.bz2 |
simplify destdir_join for readability
We can immediately short-circuit if there is no destdir, as we simply
return the prefix unchanged.
If there is some kind of destdir and the prefix contains a drive letter,
then no matter what we need to remove the drive letter before joining.
Technically, if the destdir is a relative path e.g. `destdir\` and
`C:\prefix`, we should still install to `destdir\prefix` without the
drive letter.
But... we also guarantee that destdir is an absolute path (or empty)
anyway. And even if we didn't, non-absolute destdir is a broken concept
for a variety of complicated reasons. So none of this matters in
practice.
One way or another, we don't need to actually check whether destdir is
an absolute path before cutting off the prefix drive letter.
Diffstat (limited to 'mesonbuild/mesonlib/universal.py')
0 files changed, 0 insertions, 0 deletions