Fill out path for newly created packs

Before this was only filled on loading the pack again,
preventing the created pack from being used directly.
This commit is contained in:
Oneric 2024-03-09 22:18:00 +01:00
parent 5b126567bb
commit fa98b44acf

View file

@ -31,7 +31,10 @@ def create(name) do
with :ok <- validate_not_empty([name]),
dir <- Path.join(emoji_path(), name),
:ok <- File.mkdir(dir) do
save_pack(%__MODULE__{pack_file: Path.join(dir, "pack.json")})
save_pack(%__MODULE__{
path: dir,
pack_file: Path.join(dir, "pack.json")
})
end
end