From 4e8bc40ad7a9c128e778dbafda6dadbade215c94 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 27 Dec 2007 21:35:42 -0600 Subject: Fixing the inability to manage '/' directly. It was a result of stripping extra and trailing slashes. --- lib/puppet/type/pfile.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index f86e1e273..7d928d959 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -460,7 +460,9 @@ module Puppet super # Get rid of any duplicate slashes, and remove any trailing slashes. - @title = @title.gsub(/\/+/, "/").sub(/\/$/, "") + @title = @title.gsub(/\/+/, "/") + + @title.sub!(/\/$/, "") unless @title == "/" # Clean out as many references to any file paths as possible. # This was the source of many, many bugs. -- cgit