|
|
|
@ -75,6 +75,7 @@ class MyController < ApplicationController
|
|
|
|
|
# Edit user's account
|
|
|
|
|
def account
|
|
|
|
|
@user = User.current
|
|
|
|
|
lg=@user.login
|
|
|
|
|
@pref = @user.pref
|
|
|
|
|
diskfile = disk_filename('User', @user.id)
|
|
|
|
|
diskfile1 = diskfile + 'temp'
|
|
|
|
@ -137,7 +138,7 @@ class MyController < ApplicationController
|
|
|
|
|
if File.exist?(diskfile1)
|
|
|
|
|
File.delete(diskfile1)
|
|
|
|
|
end
|
|
|
|
|
@user
|
|
|
|
|
@user.login = lg
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
# 确保文件被删除
|
|
|
|
|