diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-05-27 21:13:59 +0200 |
---|---|---|
committer | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-06-02 20:27:55 +0200 |
commit | d7be0333ae1fc03bb5b639e7ab8f5431b56d1071 (patch) | |
tree | c487b0833a90a6f186ff82f42e36ffc465958eb5 /lib/puppet | |
parent | e4d59665b75c6a2cf0bc858bcf131d9c9c83dffc (diff) | |
download | puppet-d7be0333ae1fc03bb5b639e7ab8f5431b56d1071.tar.gz puppet-d7be0333ae1fc03bb5b639e7ab8f5431b56d1071.tar.xz puppet-d7be0333ae1fc03bb5b639e7ab8f5431b56d1071.zip |
Fix #2220 - Make sure stat is refreshed while managing Files
Since the introduction of the attribute cacher, Files couldn't refresh
their 'stat' attribute while applying the properties.
This could led to misunderstanding (like not setting mode) because
the stat didn't reflect the physical state of the entity, especially
when creating directories, where puppet was taking decision thinking
the directory didn't exist although it was just created.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type/file.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 99f5b96c1..1d50de5ed 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -909,7 +909,7 @@ module Puppet next unless [:mode, :owner, :group, :seluser, :selrole, :seltype, :selrange].include?(thing.name) # Make sure we get a new stat objct - self.stat(true) + expire currentvalue = thing.retrieve unless thing.insync?(currentvalue) thing.sync |