From 2758d2f3871f73ba40bc1adb34d7c8c71b3a1960 Mon Sep 17 00:00:00 2001 From: Artur Jamro Date: Thu, 1 Aug 2019 09:55:44 -0700 Subject: [PATCH] Allow colons in Windows host paths --- src/wasmtime.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wasmtime.rs b/src/wasmtime.rs index 08b33150b4fb..359169792707 100644 --- a/src/wasmtime.rs +++ b/src/wasmtime.rs @@ -81,7 +81,7 @@ Options: --preload= load an additional wasm module before loading the main module --env= pass an environment variable (\"key=value\") to the program --dir= grant access to the given host directory - --mapdir= where has the form :, grant access to + --mapdir= where has the form ::, grant access to the given host directory with the given wasm directory name -h, --help print this help message --version print the Cranelift version @@ -135,9 +135,9 @@ fn compute_preopen_dirs(flag_dir: &[String], flag_mapdir: &[String]) -> Vec<(Str } for mapdir in flag_mapdir { - let parts: Vec<&str> = mapdir.split(':').collect(); + let parts: Vec<&str> = mapdir.split("::").collect(); if parts.len() != 2 { - println!("--mapdir argument must contain exactly one colon, separating a guest directory name and a host directory name"); + println!("--mapdir argument must contain exactly one double colon ('::'), separating a guest directory name and a host directory name"); exit(1); } let (key, value) = (parts[0], parts[1]);