aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/scripts/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/scripts/__init__.py b/mesonbuild/scripts/__init__.py
index 476a28a..7277771 100644
--- a/mesonbuild/scripts/__init__.py
+++ b/mesonbuild/scripts/__init__.py
@@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from pathlib import PurePath
+
def destdir_join(d1: str, d2: str) -> str:
if not d1:
return d2
# c:\destdir + c:\prefix must produce c:\destdir\prefix
- if len(d2) > 1 and d2[1] == ':':
- return d1 + d2[2:]
- return d1 + d2
+ return str(PurePath(d1, *PurePath(d2).parts[1:]))