Improved error handling.

This commit is contained in:
Martin Edenhofer 2013-01-16 00:10:27 +01:00
parent 7183f56042
commit 9ebe5da994

View file

@ -94,7 +94,9 @@ module Session
def self.jobs
# just make sure that spool path exists
FileUtils.mkpath @path
if !File::exists?( @path )
FileUtils.mkpath @path
end
Thread.abort_on_exception = true
while true
@ -147,6 +149,12 @@ module Session
def self.sessions
path = @path + '/'
# just make sure that spool path exists
if !File::exists?( path )
FileUtils.mkpath path
end
data = []
Dir.foreach( path ) do |entry|
if entry != '.' && entry != '..'