Do not assume autosave path exists

This commit is contained in:
José Valim 2022-01-31 12:00:14 +01:00
parent efdbf67f59
commit aaa4f406bf

View file

@ -18,7 +18,7 @@ defmodule LivebookWeb.HomeLive.SessionListComponent do
show_autosave_note? =
case Livebook.Settings.autosave_path() do
nil -> false
path -> File.ls!(path) != []
path -> match?({:ok, [_ | _]}, File.ls(path))
end
socket =