forked from mirrors/akkoma
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:
parent
5b126567bb
commit
fa98b44acf
|
@ -31,7 +31,10 @@ def create(name) do
|
||||||
with :ok <- validate_not_empty([name]),
|
with :ok <- validate_not_empty([name]),
|
||||||
dir <- Path.join(emoji_path(), name),
|
dir <- Path.join(emoji_path(), name),
|
||||||
:ok <- File.mkdir(dir) do
|
: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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue