Fix saving for notebooks loaded from a URL (#2300)

This commit is contained in:
Jonatan Kłosko 2023-10-24 20:36:19 +02:00 committed by GitHub
parent 0dca78ecc8
commit 14aca09470
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ defmodule LivebookWeb.SessionLive.PersistenceComponent do
case assigns.session.origin do
# If it's a forked notebook, default to the same folder
{:file, file} -> FileSystem.File.containing_dir(file)
nil -> Livebook.Settings.default_dir(assigns.hub)
_ -> Livebook.Settings.default_dir(assigns.hub)
end
end)
|> assign_new(:saved_file, fn -> file end)