fixxed problems related to path input

This commit is contained in:
Hans-Joachim Kliemeck 2015-11-06 14:29:11 +01:00 committed by Matt Clay
commit 5f9eaf193e
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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