Try to prevent "Errno::ENOENT: No such file or directory @ rb_sysopen".

This commit is contained in:
Martin Edenhofer 2015-05-03 10:40:10 +02:00
parent 6642017f23
commit d8d506ea44

View file

@ -32,12 +32,13 @@ returns
path = @path + '/' + client_id.to_s
FileUtils.mkpath path
meta[:last_ping] = Time.new.to_i.to_s
data = {
user: session,
meta: meta,
}
content = data.to_s
File.open( path + '/session', 'wb' ) { |file|
data = {
user: session,
meta: meta,
}
file.write data.to_json
file.write content
}
# send update to browser