summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-06-20 18:46:58 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-06-20 18:46:58 +0000
commit4a717068d28db602ea831b88404d47305115c53f (patch)
treef402018065ccf9413c91666e9e4e5e399c21d93a /lib
parentf9a4d7addd7e31e6b868cbbf3cc87ffbfea781e3 (diff)
Fixing #178. I just added URI escaping and unescaping to file names.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1307 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/server/fileserver.rb4
-rw-r--r--lib/puppet/type/pfile.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb
index ef35365a8..e19b3c5d7 100755
--- a/lib/puppet/server/fileserver.rb
+++ b/lib/puppet/server/fileserver.rb
@@ -273,7 +273,7 @@ class Server
Puppet.err "FileServer error: Cannot read %s; cannot serve" % @config
#raise Puppet::Error, "Cannot read %s" % @config
rescue Errno::ENOENT => detail
- Puppet.err "FileServer error: '%s' does not exit; cannot serve" %
+ Puppet.err "FileServer error: '%s' does not exist; cannot serve" %
@config
#raise Puppet::Error, "%s does not exit" % @config
#rescue FileServerError => detail
@@ -420,6 +420,8 @@ class Server
# Remove any double slashes that might have occurred
path.gsub!(/\/\//, "/")
end
+
+ path = URI.unescape(path)
return mount, path
end
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb
index eb9b1d36e..7e6b365df 100644
--- a/lib/puppet/type/pfile.rb
+++ b/lib/puppet/type/pfile.rb
@@ -806,7 +806,7 @@ module Puppet
devfail "Got a nil source"
end
if source =~ /^\//
- source = "file://localhost/%s" % source
+ source = "file://localhost/%s" % URI.escape(source)
sourceobj.mount = "localhost"
sourceobj.local = true
end