Small improvement to Sessions.cleanup.
This commit is contained in:
parent
90047729d4
commit
10b11cb726
1 changed files with 2 additions and 5 deletions
|
@ -457,11 +457,8 @@ remove all session and spool messages
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def self.cleanup
|
def self.cleanup
|
||||||
Dir.foreach(@path) do |entry|
|
return true if !File.exist?(@path)
|
||||||
next if entry == '.'
|
FileUtils.rm_rf @path
|
||||||
next if entry == '..'
|
|
||||||
FileUtils.rm_rf entry
|
|
||||||
end
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue