Try to prevent "Errno::ENOENT: No such file or directory @ rb_sysopen".
This commit is contained in:
parent
6642017f23
commit
d8d506ea44
1 changed files with 6 additions and 5 deletions
|
@ -32,12 +32,13 @@ returns
|
||||||
path = @path + '/' + client_id.to_s
|
path = @path + '/' + client_id.to_s
|
||||||
FileUtils.mkpath path
|
FileUtils.mkpath path
|
||||||
meta[:last_ping] = Time.new.to_i.to_s
|
meta[:last_ping] = Time.new.to_i.to_s
|
||||||
|
data = {
|
||||||
|
user: session,
|
||||||
|
meta: meta,
|
||||||
|
}
|
||||||
|
content = data.to_s
|
||||||
File.open( path + '/session', 'wb' ) { |file|
|
File.open( path + '/session', 'wb' ) { |file|
|
||||||
data = {
|
file.write content
|
||||||
user: session,
|
|
||||||
meta: meta,
|
|
||||||
}
|
|
||||||
file.write data.to_json
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# send update to browser
|
# send update to browser
|
||||||
|
|
Loading…
Reference in a new issue