From 4f33014464004dee1b45e33831bb6528ead6d3f7 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 7 Feb 2008 23:53:20 +0000 Subject: [PATCH] Use FileUtils.mv instead of File.rename as it will do a copy+delete when the source and target are not on the same filesystem. Closes #670. --- app/controllers/trace_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index c56ff4a74..4db6e8e15 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -301,7 +301,7 @@ private @trace.timestamp = Time.now if @trace.save - File.rename(filename, @trace.trace_name) + FileUtils.mv(filename, @trace.trace_name) else FileUtils.rm_f(filename) end -- 2.43.2