From 3987fc29c88219a17b5a1b01bb7f37a9baaf28ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Tue, 18 Jul 2023 22:17:03 +0200 Subject: [PATCH] Fix chunked write for local file system to handle cross-partition copy --- lib/livebook/file_system/local.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/livebook/file_system/local.ex b/lib/livebook/file_system/local.ex index 6d844ff9e..c7c1c78d0 100644 --- a/lib/livebook/file_system/local.ex +++ b/lib/livebook/file_system/local.ex @@ -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} ->