Mercurial Hosting > luan
comparison src/luan/host/main.luan @ 1662:d6a50ed9604f
file.move_to
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 02 May 2022 19:15:42 -0600 |
parents | d9a5405a3102 |
children | b82767112d8e |
comparison
equal
deleted
inserted
replaced
1661:08177ced7fa0 | 1662:d6a50ed9604f |
---|---|
170 type(new_domain)=="string" or error() | 170 type(new_domain)=="string" or error() |
171 new_domain = lower(new_domain) | 171 new_domain = lower(new_domain) |
172 local new_dir = sites_dir.child(new_domain) | 172 local new_dir = sites_dir.child(new_domain) |
173 new_dir.exists() and error "new_domain already exists" | 173 new_dir.exists() and error "new_domain already exists" |
174 WebHandler.removeHandler(old_domain) | 174 WebHandler.removeHandler(old_domain) |
175 old_dir.rename_to(new_dir.to_string()) | 175 old_dir.move_to(new_dir.to_string()) |
176 WebHandler.removeHandler(old_domain) | 176 WebHandler.removeHandler(old_domain) |
177 WebHandler.loadHandler(new_domain) | 177 WebHandler.loadHandler(new_domain) |
178 end | 178 end |
179 | 179 |
180 function fns.change_password(domain,old_password,new_password) | 180 function fns.change_password(domain,old_password,new_password) |