diff 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
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/Lucene.luan	Mon Jul 18 05:14:19 2016 -0600
+++ b/lucene/src/luan/modules/lucene/Lucene.luan	Mon Jul 18 20:18:02 2016 -0600
@@ -132,18 +132,14 @@
 	if Rpc.functions.backup == nil then
 
 		function Rpc.functions.lucene_backup(password)
-			if Io.password ~= password then
-				error "wrong password"
-			end
+			Io.password == password or error "wrong password"
 			local zip_file = uri("file:"..index.dir).parent().child("backup.zip")
 			index.zip(zip_file)
 			return zip_file
 		end
 
 		function Rpc.functions.lucene_restore(password,zip_file)
-			if Io.password ~= password then
-				error "wrong password"
-			end
+			Io.password == password or error "wrong password"
 			index.restore(zip_file)
 		end