diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-12-11 16:24:29 -0800 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-12-11 16:24:29 -0800 |
commit | da59a45b758793562babf871a9aedb1cd51726fd (patch) | |
tree | f1ca8deb23a0c8f50ef418bbc8c2bce0a89fed39 /lib/chef/win32/api | |
parent | 16b1b5f977f6858d914d5b1fe748b4d6a4cff7f4 (diff) | |
download | chef-da59a45b758793562babf871a9aedb1cd51726fd.tar.gz |
Revert "Merge pull request #1901 from opscode/dont-prepend-to-relative-paths"
This reverts commit 1241ea6f9866d0e61d11129bb32e5fc96cd2bac0, reversing
changes made to 34d956c6b96087e6ca4bfbc9080037ded481709d.
Conflicts:
spec/functional/resource/file_spec.rb
spec/functional/resource/link_spec.rb
spec/unit/provider/link_spec.rb
Diffstat (limited to 'lib/chef/win32/api')
-rw-r--r-- | lib/chef/win32/api/file.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb index da9713e119..7a8dafd8b5 100644 --- a/lib/chef/win32/api/file.rb +++ b/lib/chef/win32/api/file.rb @@ -459,7 +459,11 @@ BOOL WINAPI DeviceIoControl( # to be passed to the *W vesion of WinAPI File # functions def encode_path(path) - Chef::Util::PathHelper.canonical_path(path).to_wstring + (path_prepender << path.gsub(::File::SEPARATOR, ::File::ALT_SEPARATOR)).to_wstring + end + + def path_prepender + "\\\\?\\" end # retrieves a file search handle and passes it |