comparison lucene/src/luan/modules/lucene/Lucene.luan @ 757:e1dfeddfbc7b

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 18 Jul 2016 20:18:02 -0600
parents 9092e52f94eb
children 99356cfde2f0
comparison
equal deleted inserted replaced
756:9092e52f94eb 757:e1dfeddfbc7b
130 end 130 end
131 131
132 if Rpc.functions.backup == nil then 132 if Rpc.functions.backup == nil then
133 133
134 function Rpc.functions.lucene_backup(password) 134 function Rpc.functions.lucene_backup(password)
135 if Io.password ~= password then 135 Io.password == password or error "wrong password"
136 error "wrong password"
137 end
138 local zip_file = uri("file:"..index.dir).parent().child("backup.zip") 136 local zip_file = uri("file:"..index.dir).parent().child("backup.zip")
139 index.zip(zip_file) 137 index.zip(zip_file)
140 return zip_file 138 return zip_file
141 end 139 end
142 140
143 function Rpc.functions.lucene_restore(password,zip_file) 141 function Rpc.functions.lucene_restore(password,zip_file)
144 if Io.password ~= password then 142 Io.password == password or error "wrong password"
145 error "wrong password"
146 end
147 index.restore(zip_file) 143 index.restore(zip_file)
148 end 144 end
149 145
150 else 146 else
151 Rpc.functions.lucene_backup = multi_error 147 Rpc.functions.lucene_backup = multi_error