Skip to content

Commit

Permalink
sethome: Do not write empty homes file
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jun 10, 2020
1 parent 6d2a897 commit af045dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mods/sethome/init.lua
Expand Up @@ -32,6 +32,9 @@ sethome.set = function(name, pos)
player:set_attribute("sethome:home", minetest.pos_to_string(pos))

-- remove `name` from the old storage file
if not homepos[name] then
return true
end
local data = {}
local output = io.open(homes_file, "w")
if output then
Expand Down

0 comments on commit af045dc

Please sign in to comment.