From aaa4f406bf4b60165a82f9c49257017b13145374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 31 Jan 2022 12:00:14 +0100 Subject: [PATCH] Do not assume autosave path exists --- lib/livebook_web/live/home_live/session_list_component.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/livebook_web/live/home_live/session_list_component.ex b/lib/livebook_web/live/home_live/session_list_component.ex index e24b25af8..9254bcd8f 100644 --- a/lib/livebook_web/live/home_live/session_list_component.ex +++ b/lib/livebook_web/live/home_live/session_list_component.ex @@ -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 =