summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordheerajd-msys <dheeraj.dubey@msystechnologies.com>2018-05-23 17:16:24 +0530
committerdheerajd-msys <dheeraj.dubey@msystechnologies.com>2018-06-08 17:55:54 +0530
commit8f068aef016c19fe53ef8c8e7b9627780518af15 (patch)
tree31bcff9eb45e117e28a5ef8e5cfbd6c64cbb3af8
parentbafefdb3ba5e38cef8d58fa83f487befa0c78752 (diff)
downloadchef-8f068aef016c19fe53ef8c8e7b9627780518af15.tar.gz
added check for mount_point in name
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
-rw-r--r--lib/chef/provider/mount/windows.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/provider/mount/windows.rb b/lib/chef/provider/mount/windows.rb
index d4afa8702b..8e5addccef 100644
--- a/lib/chef/provider/mount/windows.rb
+++ b/lib/chef/provider/mount/windows.rb
@@ -41,7 +41,9 @@ class Chef
def load_current_resource
if is_volume(@new_resource.device)
@mount = Chef::Util::Windows::Volume.new(@new_resource.name)
- else #assume network drive
+ elsif @new_resource.name.include?(":") && !@new_resource.mount_point #assume network drive
+ @mount = Chef::Util::Windows::NetUse.new(@new_resource.name)
+ else
@mount = Chef::Util::Windows::NetUse.new(@new_resource.mount_point)
end