Use FileUtils.mv instead of File.rename as it will do a copy+delete when
authorTom Hughes <tom@compton.nu>
Thu, 7 Feb 2008 23:53:20 +0000 (23:53 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 7 Feb 2008 23:53:20 +0000 (23:53 +0000)
the source and target are not on the same filesystem. Closes #670.

app/controllers/trace_controller.rb

index c56ff4a74052b242a8eea72f80d30ddf6b156b74..4db6e8e15f4b80e4fafa6a33092d0cac60537a0d 100644 (file)
@@ -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