Expand System.tmp_dir!() path by default (#754)

Since System.tmp_dir!/0 returns the path with backslashes instead of
frontslash it is piped to Path.expand/1 to normalize it to frontslashes.
This commit is contained in:
Kevin 2021-12-05 14:58:07 +01:00 committed by GitHub
parent 34697bfdfc
commit 40e3a61e00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,7 +138,7 @@ defmodule Livebook.Config do
if writable_directory?(cache_path) do
cache_path
else
System.tmp_dir!() |> Path.join("livebook")
System.tmp_dir!() |> Path.expand() |> Path.join("livebook")
end
notebooks_path = Path.join(path, "notebooks")