From 9d8b6d470dc419f3d153821a196e25e1f25e96a5 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Kliemeck Date: Fri, 6 Nov 2015 14:29:11 +0100 Subject: [PATCH] fixxed problems related to path input --- windows/win_share.ps1 | 3 +++ windows/win_share.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/windows/win_share.ps1 b/windows/win_share.ps1 index 3d816ac1657..86970f88d39 100644 --- a/windows/win_share.ps1 +++ b/windows/win_share.ps1 @@ -144,6 +144,9 @@ Try { Fail-Json $result "$path directory does not exist on the host" } + # normalize path and remove slash at the end + $path = (Get-Item $path).FullName -replace ".$" + # need to (re-)create share If (!$share) { New-SmbShare -Name $name -Path $path diff --git a/windows/win_share.py b/windows/win_share.py index 6a6039bad30..9e54185b64b 100644 --- a/windows/win_share.py +++ b/windows/win_share.py @@ -91,7 +91,7 @@ EXAMPLES = ''' win_share: name: internal description: top secret share - path: C:\\shares\\internal\\ + path: C:/shares/internal list: 'no' full: Administrators,CEO read: HR-Global @@ -101,7 +101,7 @@ EXAMPLES = ''' win_share: name: company description: top secret share - path: C:\\shares\\company\\ + path: C:/shares/company list: 'yes' full: Administrators,CEO read: Global