Fix chunked write for local file system to handle cross-partition copy

This commit is contained in:
Jonatan Kłosko 2023-07-18 22:17:03 +02:00
parent ad40b84f10
commit 3987fc29c8

View file

@ -269,7 +269,7 @@ defimpl Livebook.FileSystem, for: Livebook.FileSystem.Local do
File.close(state.device)
with :ok <- File.mkdir_p(Path.dirname(state.path)),
:ok <- File.rename(state.download_path, state.path) do
:ok <- rename_or_move(state.download_path, state.path) do
:ok
else
{:error, error} ->