From 34bd8cf351a4b4d1459cf0443829cc57776863e8 Mon Sep 17 00:00:00 2001 From: yuk7 Date: Sun, 4 Mar 2018 22:46:18 +0900 Subject: [PATCH] main.c: no args to don't inhirit current directory --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 522f711..f0cb8aa 100644 --- a/main.c +++ b/main.c @@ -53,10 +53,12 @@ int main() + int Lcurrent = 0; if(wargc >1) { if(wcscmp(wargv[1],L"run") == 0) { + Lcurrent = 1; } else if((wcscmp(wargv[1],L"config") == 0)&&wargc>3) { @@ -261,7 +263,7 @@ int main() } unsigned long exitcode; - res = WslLaunchInteractive(TargetName,rArgs,1,&exitcode); + res = WslLaunchInteractive(TargetName,rArgs,Lcurrent,&exitcode); if(res==0) return exitcode; else @@ -315,7 +317,7 @@ void show_usage() wprintf(L" \n"); wprintf(L" - Launches the distro's default behavior. By default, this launches your default shell.\n\n"); wprintf(L" run \n"); - wprintf(L" - Run the given command line in that distro.\n\n"); + wprintf(L" - Run the given command line in that distro. Inherit current directory.\n\n"); wprintf(L" config [setting [value]]\n"); wprintf(L" - `--default-user `: Set the default user for this distro to \n"); wprintf(L" - `--default-uid `: Set the default user uid for this distro to \n");