diff --git a/lib/livebook/file_system/file.ex b/lib/livebook/file_system/file.ex index cfc270339..5ee3b73ee 100644 --- a/lib/livebook/file_system/file.ex +++ b/lib/livebook/file_system/file.ex @@ -49,7 +49,7 @@ defmodule Livebook.FileSystem.File do """ @spec local(FileSystem.path()) :: t() def local(path) do - new(FileSystem.Local.new(), path) + new(Livebook.Config.local_filesystem(), path) end @doc """ diff --git a/test/livebook/file_system/file_test.exs b/test/livebook/file_system/file_test.exs index 4da94e0b5..e08d01e29 100644 --- a/test/livebook/file_system/file_test.exs +++ b/test/livebook/file_system/file_test.exs @@ -30,6 +30,12 @@ defmodule Livebook.FileSystem.FileTest do end end + describe "local/1" do + test "uses the globally configured local file system instance" do + assert FileSystem.File.local("/path").file_system == Livebook.Config.local_filesystem() + end + end + describe "relative/2" do test "ignores the file path if an absolute path is given" do file_system = FileSystem.Local.new()